Cluster health API should return RED status (on applicable levels) when an index has not recovered from the gateway, closes #507.

This commit is contained in:
kimchy 2010-11-09 21:25:22 +02:00
parent 4695f93276
commit 4c6af6afa5
7 changed files with 30 additions and 14 deletions

View file

@ -83,7 +83,11 @@ public class HdfsGatewayTests {
assertThat(createIndexResponse.acknowledged(), equalTo(true));
node.close();
node = buildNode().start();
Thread.sleep(500);
logger.info("--> waiting for green status");
ClusterHealthResponse health = node.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet();
assertThat(health.timedOut(), equalTo(false));
try {
node.client().admin().indices().create(createIndexRequest("test")).actionGet();
assert false : "index should exists";