Skip to content

Commit 0618b02

Browse files
authored
[tests] StandaloneRestIntegTestTask should set a minimum maxParallelForks of 1 (#126346) (#128391)
(cherry picked from commit a13a46a)
1 parent 378c360 commit 0618b02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void apply(Project project) {
167167
nonInputSystemProperties.systemProperty(TESTS_FEATURES_METADATA_PATH, () -> featureMetadataConfig.getAsPath());
168168

169169
// Enable parallel execution for these tests since each test gets its own cluster
170-
task.setMaxParallelForks(task.getProject().getGradle().getStartParameter().getMaxWorkerCount() / 2);
170+
task.setMaxParallelForks(Math.max(1, task.getProject().getGradle().getStartParameter().getMaxWorkerCount() / 2));
171171
nonInputSystemProperties.systemProperty(TESTS_MAX_PARALLEL_FORKS_SYSPROP, () -> String.valueOf(task.getMaxParallelForks()));
172172

173173
// Disable test failure reporting since this stuff is now captured in build scans

0 commit comments

Comments
 (0)