[TEST] Wait for LANGUID events to be processed before pulling stats

This commit is contained in:
Simon Willnauer 2014-04-08 12:40:37 +02:00
parent e8467f0978
commit de13d707ed
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.client.Requests;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.monitor.sigar.SigarService;
import org.elasticsearch.test.ElasticsearchIntegrationTest;
@ -45,7 +46,7 @@ public class ClusterStatsTests extends ElasticsearchIntegrationTest {
private void waitForNodes(int numNodes) {
ClusterHealthResponse actionGet = client().admin().cluster()
.health(Requests.clusterHealthRequest().waitForNodes(Integer.toString(numNodes))).actionGet();
.health(Requests.clusterHealthRequest().waitForEvents(Priority.LANGUID).waitForNodes(Integer.toString(numNodes))).actionGet();
assertThat(actionGet.isTimedOut(), is(false));
}