How can I use @ParameterizedClass and @Isolated together? #5154
-
|
I have a test that uses One of the tests uses I want to keep concurrent test execution. How can I achieve the goal with JUnit 5? (I need the tests to be runnable with Java 8) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Instead of
Until those issues are resolved, I think your best bet is to move the test method using |
Beta Was this translation helpful? Give feedback.
@Isolatedis only applicable to test classes, not methods. Putting it on@ClassTemplateclass currently fails and I've just opened an issue to fix that:Instead of
@Isolated, you could annotate all methods that read/writeLocale.getDefault()with a@ResourceLockannotation (or use Pioneer's@ReadsDefaultLocaleand@WritesDefaultLocale). However, there are currently somee issues with that as well:Until those issues are resolved, I think your best bet is to move the test method using
Locale.setDefaultto a separate class unparameterized…