-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flaky test or race condition - ParallelSpec#@ResourceLock with only READ allows parallel execution of data-driven features
#1600
Comments
I wonder how |
Interesting question. Maybe the value has changed in between the evaluations of both? (No, I have not thought this through yet, just guessing in "rubber duck mode".) |
Yeah, but it "shouldn't" be possible ™️ Damn you, multi-thread development. :-D |
I even quickly added a |
Do you think that maybe in rare cases spock/spock-specs/src/test/groovy/org/spockframework/smoke/extension/ParallelSpec.groovy Lines 518 to 524 in 3d7aa63
Sorry, I did not run or even check out the code, I just had 3 minutes while waiting for a chat reply while working. |
Oh, you might be right, thanks. |
Describe the bug
I've seen the
ParallelSpec#@ResourceLock with only READ allows parallel execution of data-driven features
test failing within
master
lately in GitHub Action run.I tried to reproduce by adding
@RepeatUntilFailure
(nice addition).First try didn't reproduce in about 1000 runs.
Second try reproced after 4 iterations with the same failure.
Third try didn't reproduce again in about 1000 runs.
So it seems there is some race condition somewhere.
To Reproduce
Add
@RepeatUntilFailure
to the test and try to make it failExpected behavior
No assertion error
Actual behavior
Occasionally assertion error
Java version
Seen with Java 8 and Java 17.
Seen with Groovy 2.5 and Groovy 3.0 variant.
Buildtool version
Gradle as configured in
master
What operating system are you using
Windows
The text was updated successfully, but these errors were encountered: