[TEST] Wait for yellow after enable allocation on all nodes in BWC tests

This commit is contained in:
Simon Willnauer 2014-07-02 11:38:52 +02:00
parent e76eb228b2
commit 06918d547a
1 changed files with 4 additions and 3 deletions

View File

@ -230,11 +230,12 @@ public class BasicBackwardsCompatibilityTest extends ElasticsearchBackwardsCompa
indexRandom(true, docs); indexRandom(true, docs);
} }
client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.builder().put(EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE, "all")).get(); 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++) { for (int i = 0; i < numIters; i++) {
countResponse = client().prepareCount().get(); assertHitCount(client().prepareCount().get(), numDocs);
assertHitCount(countResponse, numDocs);
} }
ensureGreen(); // wait for all the relocation
assertVersionCreated(compatibilityVersion(), "test"); assertVersionCreated(compatibilityVersion(), "test");
} }