From 28adbd475dbaa9ef689cabcc501004f05b74a8b7 Mon Sep 17 00:00:00 2001 From: uboness Date: Sun, 24 Nov 2013 20:26:12 +0100 Subject: [PATCH] added a waitForGreen condition for the unmapped tests on missing agg --- .../search/aggregations/bucket/MissingTests.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java b/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java index c7090a1e9f7..c1fa4a28640 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java @@ -91,6 +91,8 @@ public class MissingTests extends ElasticsearchIntegrationTest { @Test public void unmapped() throws Exception { + client().admin().cluster().prepareHealth("unmapped_idx").setWaitForYellowStatus().execute().actionGet(); + SearchResponse response = client().prepareSearch("unmapped_idx") .addAggregation(missing("missing_tag").field("tag")) .execute().actionGet(); @@ -105,6 +107,8 @@ public class MissingTests extends ElasticsearchIntegrationTest { @Test public void partiallyUnmapped() throws Exception { + client().admin().cluster().prepareHealth("unmapped_idx").setWaitForYellowStatus().execute().actionGet(); + SearchResponse response = client().prepareSearch("idx", "unmapped_idx") .addAggregation(missing("missing_tag").field("tag")) .execute().actionGet();