-
-
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
Introduce a @NotThreadSafe annotation #141
Comments
Use JCIP annotations as we do in Surefire few years. |
WHEN forking test by class, my utopian dream is that each fork isolates the test in a way such that exceptions wont interrupt the test suite, but only fail the individual test-thread. Thats a problem I have with TestNG running via Surefire. This could be where JUnit might be able to exceed TestNG. |
Related issue: #60. |
This can be done since 5.3 using |
Feature request:
To speed up testing, one would like to run unit tests in parallel on the same JVM.
This is already possible for example in the Maven Surefire plugin.
However, in some cases you cannot run some of the unit tests in parallel.
An example is when more than one test does manipulate the same static state, eg a cache.
It would be good to be able to have a tag to specify that a specific test (or test class) should never be run in parallel on the same JVM.
It would be then the responsibility of the runner (eg Surefire/Failsafe plugins) to honor such constraint.
A further annotation (or an option in the above one) could be used to tag a test to never run in parallel, not even if in a different spawn JVM. This might be for example useful if a set of tests are manipulating a same external resource (eg writing/reading a file). I personally never encountered such case, but I guess it could happen.
The text was updated successfully, but these errors were encountered: