From 49f18811c3b810ea71a4ba388616768bb5581956 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Fri, 29 Mar 2019 08:08:04 +0200 Subject: [PATCH] Run the build integ test in parallel (#39788) * Run the build integ test in parallel Because the randomized runner lives in buildSrc, we run these tests with the Gradle runner, and had no parallelism configured so far. * Handle Windows and "auto" better --- buildSrc/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 9f658c91ab3..be54b2c68f6 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -232,6 +232,11 @@ if (project != rootProject) { if (isLuceneSnapshot) { systemProperty 'test.lucene-snapshot-revision', isLuceneSnapshot[0][1] } + String defaultParallel = System.getProperty('tests.jvms', project.rootProject.ext.defaultParallel) + if (defaultParallel == "auto") { + defaultParallel = Math.max(Runtime.getRuntime().availableProcessors(), 4) + } + maxParallelForks defaultParallel as Integer } check.dependsOn(integTest)