Allow tests to be run in parallel across multiple workers

Closes gh-19876
This commit is contained in:
Andy Wilkinson
2021-10-29 12:48:45 +01:00
parent 2462f67be4
commit 22d85e6d7b
7 changed files with 27 additions and 29 deletions

View File

@@ -156,6 +156,7 @@ class JavaConventions {
project.getTasks().withType(Test.class, (test) -> {
test.useJUnitPlatform();
test.setMaxHeapSize("1024M");
test.setMaxParallelForks(project.getGradle().getStartParameter().getMaxWorkerCount());
project.getTasks().withType(Checkstyle.class, (checkstyle) -> test.mustRunAfter(checkstyle));
project.getTasks().withType(CheckFormat.class, (checkFormat) -> test.mustRunAfter(checkFormat));
});