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
All scenarios from same feature file are running in isolation even if only one has the @isolated tag #2589
Comments
While Cucumber assumes all scenarios and examples are completely independent from each other and the feature file they're in JUnit 5 makes some more pessimistic assumptions about its containers. From: junit-team/junit5#2038 (comment):
And: junit-team/junit5#2038 (comment)
This has been some what alleviated by junit-team/junit5#2423 but it would appear that conceptually global locks are still propagated upward and there is no if (!globalLockDescriptor.equals(testDescriptor) && allResources.contains(GLOBAL_READ_WRITE)) {
forceDescendantExecutionModeRecursively(advisor, globalLockDescriptor);
advisor.useResourceLock(globalLockDescriptor, globalReadWriteLock);
} |
@fslev looks like you did not push your changes to |
Sorry for that. |
Nah. I believe this is something that should be fixed in JUnit 5. Currently the JUnit Platform implements an assumption about one test engine (JUnit Jupiter) that does not apply to another (Cucumber). |
Not much we can do here on the Cucumber side. |
👓 What did you see?
While executing scenarios in parallel using cucumber-junit-platform-engine and "isolated" as a global exclusive resource, it seems that all scenarios from same feature file are executed in isolation, even though only one of them has the @isolated tag
✅ What did you expect to see?
Only the scenario with the @isolated tag should run isolated. The other scenarios from same feature should run in parallel.
📦 Which tool/library version are you using?
Cucumber Java 7.4.1
🔬 How could we reproduce it?
Steps to reproduce the behavior:
1.) Set the following configuration inside junit-platform.properties
2.) Create two feature files having each 3 scenarios
3.) Tag the second scenario from first feature file with @isolated
3.) Run all tests
Actual:
Scenarios running in the same time:
Feature 2 - Scenario 1
Feature 2 - Scenario 2
Feature 2 - Scenario 3
Scenarios running in serial:
Feature 1 - Scenario 1
Feature 1 - Scenario 2 (tagged with @isolated)
Feature 1 - Scenario 3
You can see the following timeline report:
I must admint that I can't say for sure if this a cucumber-junit-platform-engine issue, a Junit 5 issue or something in between.
You can reproduce the problem by running the following showcase:
The text was updated successfully, but these errors were encountered: