Skip to content

Commit

Permalink
[TEST] Wait for yellow after enable allocation on all nodes in BWC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
s1monw committed Jul 2, 2014
1 parent f842980 commit a6be129
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,12 @@ public void testIndexUpgradeSingleNode() throws Exception {
indexRandom(true, docs);
}
client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.builder().put(EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE, "all")).get();
final int numIters = randomIntBetween(10, 20);
ensureYellow();
final int numIters = randomIntBetween(1, 20);
for (int i = 0; i < numIters; i++) {
countResponse = client().prepareCount().get();
assertHitCount(countResponse, numDocs);
assertHitCount(client().prepareCount().get(), numDocs);
}
ensureGreen(); // wait for all the relocation
assertVersionCreated(compatibilityVersion(), "test");
}

Expand Down

0 comments on commit a6be129

Please sign in to comment.