diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index d0ce9f969..f0ecd2698 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -317,7 +317,6 @@ class Build { List dynamicList = buildConfig.DYNAMIC_LIST List numMachines = buildConfig.NUM_MACHINES def enableTestDynamicParallel = Boolean.valueOf(buildConfig.ENABLE_TESTDYNAMICPARALLEL) - def numMachinesPerTest = '' testList.each { testType -> @@ -334,10 +333,11 @@ class Build { def jobParams = getAQATestJobParams(testType) def parallel = 'None' + def numMachinesPerTest = '' if (enableTestDynamicParallel && dynamicList.contains(testType)) { numMachinesPerTest = numMachines.getAt(dynamicList.indexOf(testType)) - if (!numMachinesPerTest) { + if (numMachinesPerTest) { // see build configuration in jdk*_pipeline_config.groovy // when numMachines is an array, its size should match the testLists size throw new Exception("No number of machines provided for running ${testType} tests in parallel, numMachines: ${numMachines}!")