-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[ERROR] Task was deferred but should have been executed synchronously #4027
Comments
This can be reproduced with https://github.com/mpkorstanje/junit5-locks/tree/main Feature: example
@isolated
Scenario: a
When I wait 1 hour
@reads-and-writes-system-properties
Scenario: b
When I wait 1 hour
package io.cucumber.skeleton;
import io.cucumber.java.en.When;
import java.util.concurrent.TimeUnit;
public class StepDefinitions {
@When("I wait {int} hour")
public void iWaitHour(int arg0) throws InterruptedException {
TimeUnit.SECONDS.sleep(arg0);
}
} Unlike with JUnit Jupiter the
Prior to executing b, the nop lock from example and the exclusive resource from a is still held in the thread locks.
So then Lines 81 to 85 in d013085
And it is worth noting that the comment about the Lines 78 to 80 in d013085
|
I've upgraded my Cucumber test framework with JUnit 5.11.1 and I get a new error:
All I can say is that inside the feature file I have two scenarios: one marked with
@isolated
global read write exclusive resource and another scenario is marked with a simple read write exclusive resource.Reverting to JUnit 5.11.0 works without any error !
I'm sorry I cannot give more details. Maybe I will try to isolate it to a more detailed scenario when I'll have more time.
The text was updated successfully, but these errors were encountered: