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…
Reference in New Issue