Improve stability of ClusterHealthTests

This commit is contained in:
Igor Motov 2013-04-03 12:07:42 -04:00
parent d2f6349dcf
commit 356329df00
1 changed files with 2 additions and 2 deletions

View File

@ -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));