mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-27 15:39:49 +00:00
Avoid NPE in Gradle build when max-workers is set to 1 (#51561)
This commit is contained in:
parent
1a40ebfa67
commit
6b18cab826
@ -80,7 +80,7 @@ public class TestClustersPlugin implements Plugin<Project> {
|
||||
.registerIfAbsent(
|
||||
THROTTLE_SERVICE_NAME,
|
||||
TestClustersThrottle.class,
|
||||
spec -> spec.getMaxParallelUsages().set(project.getGradle().getStartParameter().getMaxWorkerCount() / 2)
|
||||
spec -> spec.getMaxParallelUsages().set(Math.min(1, project.getGradle().getStartParameter().getMaxWorkerCount() / 2))
|
||||
);
|
||||
|
||||
// register cluster hooks
|
||||
|
Loading…
x
Reference in New Issue
Block a user