Skip to content

Speed up compilation by parallelizing tests #247

@KonradHoeffner

Description

@KonradHoeffner

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions