Improve stability of ClusterHealthTests
This commit is contained in:
parent
d2f6349dcf
commit
356329df00
|
@ -47,7 +47,7 @@ public class ClusterHealthTests extends AbstractNodesTests {
|
||||||
assertThat(healthResponse.getIndices().isEmpty(), equalTo(true));
|
assertThat(healthResponse.getIndices().isEmpty(), equalTo(true));
|
||||||
|
|
||||||
logger.info("--> running cluster wide health");
|
logger.info("--> running cluster wide health");
|
||||||
healthResponse = node1.client().admin().cluster().prepareHealth().setWaitForYellowStatus().setTimeout("1s").execute().actionGet();
|
healthResponse = node1.client().admin().cluster().prepareHealth().setWaitForYellowStatus().setTimeout("10s").execute().actionGet();
|
||||||
assertThat(healthResponse.isTimedOut(), equalTo(false));
|
assertThat(healthResponse.isTimedOut(), equalTo(false));
|
||||||
assertThat(healthResponse.getStatus(), equalTo(ClusterHealthStatus.GREEN));
|
assertThat(healthResponse.getStatus(), equalTo(ClusterHealthStatus.GREEN));
|
||||||
assertThat(healthResponse.getIndices().isEmpty(), equalTo(true));
|
assertThat(healthResponse.getIndices().isEmpty(), equalTo(true));
|
||||||
|
@ -58,7 +58,7 @@ public class ClusterHealthTests extends AbstractNodesTests {
|
||||||
.execute().actionGet();
|
.execute().actionGet();
|
||||||
|
|
||||||
logger.info("--> running cluster health on an index that does exists");
|
logger.info("--> running cluster health on an index that does exists");
|
||||||
healthResponse = node1.client().admin().cluster().prepareHealth("test1").setWaitForYellowStatus().setTimeout("1s").execute().actionGet();
|
healthResponse = node1.client().admin().cluster().prepareHealth("test1").setWaitForYellowStatus().setTimeout("10s").execute().actionGet();
|
||||||
assertThat(healthResponse.isTimedOut(), equalTo(false));
|
assertThat(healthResponse.isTimedOut(), equalTo(false));
|
||||||
assertThat(healthResponse.getStatus(), equalTo(ClusterHealthStatus.GREEN));
|
assertThat(healthResponse.getStatus(), equalTo(ClusterHealthStatus.GREEN));
|
||||||
assertThat(healthResponse.getIndices().get("test1").getStatus(), equalTo(ClusterHealthStatus.GREEN));
|
assertThat(healthResponse.getIndices().get("test1").getStatus(), equalTo(ClusterHealthStatus.GREEN));
|
||||||
|
|
Loading…
Reference in New Issue