This will use all available cores to run tests, and parallelize by all - suite/class/method. On machines with multiple cores, this will vastly improve test performance. These times are on my M1 MBP with 10 (8P + 2E) cores. They were reported by maven on running mvn verify.
I first ran mvn verify and ignored the time.
Then I ran it thrice without this change, and thrice with this change.
All times in seconds.
Run 1
Run 2
Run 3
Average
Before
732
733
731
732
After
698
703
704
702
Savings
30
%
4
Testing done
All existing tests run
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue
Is this only meant to be for the unit tests, or is it meant to cover integration tests as well? (I suspect that due to the use of Docker within the integration tests, it would be difficult to parallelise those.)
Have you compared whether concurrency (forks) or parallelism (threads) yields the better result?
This will use all available cores to run tests, and parallelize by all - suite/class/method. On machines with multiple cores, this will vastly improve test performance. These times are on my M1 MBP with 10 (8P + 2E) cores. They were reported by maven on running
mvn verify
.I first ran
mvn verify
and ignored the time. Then I ran it thrice without this change, and thrice with this change.All times in seconds.
Testing done
All existing tests run