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
Surprisingly limited parallel test execution with ResourceLock and ResourceAccessMode.READ #2038
Comments
The (pessimistic) assumption behind forcing children of containers with resource locks to use execution mode |
Tentatively slated for 5.6 M2 for team discussion. |
I had discussed with @marcphilipp that there should be something like |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution. |
@marcphilipp I thin this can be closed as it has been fixed by my PR AFAIK. |
Duplicate of #2423 |
I observed the following behavior as detailed below, where test methods using resource lock with READ mode appear to be unnecessarily sequenced.
Even though ResourceLock documents that
[...] the annotated element _may_ be executed concurrently with other test classes or methods [...]
(emphasis mine), the observed test executions are somewhat a surprise to me.Steps to reproduce
Consider the following MWE:
Results
Baseline to check correct junit concurrency config, running with resource lock commented out: consistently results in max executing reads of 8 (on my machine), and
testWrite
can fail. Expected.Enable ResourceLocks on methods:
Enable ResourceLock on class: consistently a max read of 1. Correct, but very unexpected.
Especially the last point I find surprising. With many test methods, it makes sense to move the lock to the class (and not have it on each method). Such change seems valid but results in degraded execution time.
Context
junitJupiterVersion = '5.5.2'
junit.platform.properties
Deliverables
The text was updated successfully, but these errors were encountered: