How does Gradle's java plugin run JUnit tests in parallel: one queue per fork or a single queue and multiple forks?
it's the latter. gradle uses one queue and distributes each entry clockwise to the running processes. Say you have 4 tests:
- Test1 taking 10s
- Test2 taking 1s
- Test3 taking 10s
- Test4 taking 1s
and using maxParallelForks = 2
the overall test task execution would be around 20s. I guess we need to discuss if this can be improved by getting notified about "free" processes to assign Test3 directly to test worker process 2 after Test2 comes back after 1s.