improve test to wait for 2 nodes

This commit is contained in:
kimchy 2010-10-23 01:24:53 +02:00
parent e11589f3c7
commit f0f62ce00c
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class SimpleRecoveryTests extends AbstractNodesTests {
startNode("server2");
logger.info("Running Cluster Health");
clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus()).actionGet();
clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus().waitForNodes("2")).actionGet();
logger.info("Done Cluster Health, status " + clusterHealth.status());
assertThat(clusterHealth.timedOut(), equalTo(false));
assertThat(clusterHealth.status(), equalTo(ClusterHealthStatus.GREEN));