However when I tested this, the tests got stuck, as there is probably some test code that is not prepared for parallel execution.
As an alternative, I tested <forkCount>4</forkCount>, however that was slower with 48.7s.
So it seems like the naive approach doesn't work but maybe the main developers are interested in picking this up and investigating, how this can be fixed.
On a desktop Intel Core i7-9700 @ 3.00 GHz with 8 cores and no hyperthreading,
mvn test
takes 36.2s.To improve this, you can enable parallel testing in the surefire plugin configuration in pom.xml:
See https://www.baeldung.com/maven-junit-parallel-tests.
However when I tested this, the tests got stuck, as there is probably some test code that is not prepared for parallel execution.
As an alternative, I tested
<forkCount>4</forkCount>
, however that was slower with 48.7s.So it seems like the naive approach doesn't work but maybe the main developers are interested in picking this up and investigating, how this can be fixed.