Skip to content
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

Speed up compilation by parallelizing tests #247

Open
KonradHoeffner opened this issue May 19, 2021 · 0 comments
Open

Speed up compilation by parallelizing tests #247

KonradHoeffner opened this issue May 19, 2021 · 0 comments

Comments

@KonradHoeffner
Copy link
Contributor

KonradHoeffner commented May 19, 2021

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:

<configuration>
    [...]
    <parallel>all</parallel>
    <useUnlimitedThreads>true</useUnlimitedThreads>
</configuration>

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants