diff --git a/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java b/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java index 38c46fef9d174..1354978523f85 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchCluster.java @@ -133,13 +133,14 @@ public void setNumberOfNodes(int numberOfNodes) { ); } - if(numberOfNodes < zoneCount) { - throw new IllegalArgumentException("Number of nodes should be >= zoneCount but was " + numberOfNodes + " for " + this.zoneCount); + if (numberOfNodes < zoneCount) { + throw new IllegalArgumentException( + "Number of nodes should be >= zoneCount but was " + numberOfNodes + " for " + this.zoneCount + ); } int currentZone = 1; for (int i = nodes.size(); i < numberOfNodes; i++) { - //addNode(clusterName + "-" + i); currentZone = (currentZone >= zoneCount) ? 1 : (currentZone + 1); String zoneName = "zone-" + currentZone; addNode(clusterName + "-" + i, zoneName);