@@ -79,7 +79,7 @@ public void testOverShardLimit() {
7979        int  shardsToAdd  = counts .getFailingIndexShards () * (1  + counts .getFailingIndexReplicas ());
8080        Optional <String > errorMessage  = ShardLimitValidator .checkShardLimit (
8181            shardsToAdd ,
82-             state .getMetadata ().getTotalOpenLocalOnlyIndexShards (),
82+             state .getMetadata ().getTotalOpenIndexShards (),
8383            counts .getShardsPerNode (),
8484            -1 ,
8585            state .getNodes ().getDataNodes ().size (),
@@ -111,7 +111,7 @@ public void testOverShardLimitWithMaxShardCountLimit() {
111111        int  maxShardLimitOnCluster  = shardsToAdd  - 1 ;
112112        Optional <String > errorMessage  = ShardLimitValidator .checkShardLimit (
113113            shardsToAdd ,
114-             state .getMetadata ().getTotalOpenLocalOnlyIndexShards (),
114+             state .getMetadata ().getTotalOpenIndexShards (),
115115            counts .getShardsPerNode (),
116116            maxShardLimitOnCluster ,
117117            state .getNodes ().getDataNodes ().size (),
@@ -147,7 +147,7 @@ public void testUnderShardLimit() {
147147        int  shardsToAdd  = randomIntBetween (1 , (counts .getShardsPerNode () * nodesInCluster ) - existingShards );
148148        Optional <String > errorMessage  = ShardLimitValidator .checkShardLimit (
149149            shardsToAdd ,
150-             state .getMetadata ().getTotalOpenLocalOnlyIndexShards (),
150+             state .getMetadata ().getTotalOpenIndexShards (),
151151            counts .getShardsPerNode (),
152152            -1 ,
153153            state .getNodes ().getDataNodes ().size (),
@@ -235,7 +235,7 @@ public void testComputedMaxShardsOfClusterIntOverFlow() {
235235        ClusterState  state  = createClusterForShardLimitTest (15 , 1 , 1 );
236236        Optional <String > errorMessage  = ShardLimitValidator .checkShardLimit (
237237            2 ,
238-             state .getMetadata ().getTotalOpenLocalOnlyIndexShards (),
238+             state .getMetadata ().getTotalOpenIndexShards (),
239239            maxShardLimitPerNode ,
240240            -1 ,
241241            state .getNodes ().getDataNodes ().size (),
@@ -245,7 +245,7 @@ public void testComputedMaxShardsOfClusterIntOverFlow() {
245245
246246        errorMessage  = ShardLimitValidator .checkShardLimit (
247247            Integer .MAX_VALUE  - 1 ,
248-             state .getMetadata ().getTotalOpenLocalOnlyIndexShards (),
248+             state .getMetadata ().getTotalOpenIndexShards (),
249249            maxShardLimitPerNode ,
250250            -1 ,
251251            state .getNodes ().getDataNodes ().size (),
0 commit comments