mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
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:
parent
4695f93276
commit
4c6af6afa5
7 changed files with 30 additions and 14 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue