Reputation: 1189
Poorly written unit tests are generally affected by the parallelism in JUnit execution. Can setting the number of threads for JUnit helps?
I read it somewhere, but I'm not sure. Can someone tell how can we set it? And where?
Upvotes: 2
Views: 2336
Reputation: 31
By defaul jUnit executes @Test methods in 4 threads. Howerver you can increase that number by putting:
junit.jupiter.execution.parallel.config.fixed.parallelism={numberOfThreads}
into:
src/main/resources/junit-platform.properties
Upvotes: 3