Skip to content

Commit

Permalink
Fix testSingleIndexShardAllocation
Browse files Browse the repository at this point in the history
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
  • Loading branch information
ltaragi committed Feb 25, 2025
1 parent 74b9b94 commit 0651098
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,16 @@ public void testSingleIndexShardAllocation() throws Exception {

// Remove a node
internalCluster().stopRandomNode(InternalTestCluster.nameFilter(nodeNames.get(0)));
ensureGreen(TimeValue.timeValueSeconds(60));
internalCluster().validateClusterFormed();
ensureGreen(TimeValue.timeValueSeconds(100));
state = client().admin().cluster().prepareState().execute().actionGet().getState();
logger.info(ShardAllocations.printShardDistribution(state));
verifyPerIndexPrimaryBalance();

// Add a new node
internalCluster().startDataOnlyNode();
ensureGreen(TimeValue.timeValueSeconds(60));
internalCluster().validateClusterFormed();
ensureGreen(TimeValue.timeValueSeconds(100));
state = client().admin().cluster().prepareState().execute().actionGet().getState();
logger.info(ShardAllocations.printShardDistribution(state));
verifyPerIndexPrimaryBalance();
Expand Down

0 comments on commit 0651098

Please sign in to comment.