[tests] StandaloneRestIntegTestTask should set a minimum maxParallelForks of 1 (#126346)

This commit is contained in:
Brian Seeders 2025-05-23 10:42:34 -04:00 committed by GitHub
parent 00c3146dcf
commit a13a46a2da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,7 +165,7 @@ public class RestTestBasePlugin implements Plugin<Project> {
nonInputSystemProperties.systemProperty(TESTS_FEATURES_METADATA_PATH, () -> featureMetadataConfig.getAsPath()); nonInputSystemProperties.systemProperty(TESTS_FEATURES_METADATA_PATH, () -> featureMetadataConfig.getAsPath());
// Enable parallel execution for these tests since each test gets its own cluster // Enable parallel execution for these tests since each test gets its own cluster
task.setMaxParallelForks(task.getProject().getGradle().getStartParameter().getMaxWorkerCount() / 2); task.setMaxParallelForks(Math.max(1, task.getProject().getGradle().getStartParameter().getMaxWorkerCount() / 2));
nonInputSystemProperties.systemProperty(TESTS_MAX_PARALLEL_FORKS_SYSPROP, () -> String.valueOf(task.getMaxParallelForks())); nonInputSystemProperties.systemProperty(TESTS_MAX_PARALLEL_FORKS_SYSPROP, () -> String.valueOf(task.getMaxParallelForks()));
// Disable test failure reporting since this stuff is now captured in build scans // Disable test failure reporting since this stuff is now captured in build scans