Browse Source

Ensure test node count is always in upper bound (#47383)

The math for the randomization in this test can only handle up to 90
nodes (although the production logic is fine with more). This call
wasn't adjusted when that limit was put in place.
Gordon Brown 6 năm trước cách đây
mục cha
commit
20525493eb

+ 1 - 1
server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java

@@ -594,7 +594,7 @@ public class IndicesServiceTests extends ESSingleNodeTestCase {
     }
 
     public void testUnderShardLimit() {
-        int nodesInCluster = randomIntBetween(2,100);
+        int nodesInCluster = randomIntBetween(2,90);
         // Calculate the counts for a cluster 1 node smaller than we have to ensure we have headroom
         ClusterShardLimitIT.ShardCounts counts = forDataNodeCount(nodesInCluster - 1);