浏览代码

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 年之前
父节点
当前提交
20525493eb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/src/test/java/org/elasticsearch/indices/IndicesServiceTests.java

+ 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);