[Test] testSingleNodeWithFlush should wait for yellow

O.w. it can restart a node before all primaries are started , leading to a red state down the road...
This commit is contained in:
Boaz Leskes 2014-07-14 15:12:07 +02:00
parent 80774877ff
commit dcb2107a1d
1 changed files with 3 additions and 0 deletions

View File

@ -208,6 +208,9 @@ public class SimpleRecoveryLocalGatewayTests extends ElasticsearchIntegrationTes
assertHitCount(client().prepareCount().setQuery(matchAllQuery()).execute().actionGet(), 2);
ensureYellow("test"); // wait for primary allocations here otherwise if we have a lot of shards we might have a
// shard that is still in post recovery when we restart and the ensureYellow() below will timeout
internalCluster().fullRestart();
logger.info("Running Cluster Health (wait for the shards to startup)");