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 59e4e9644fb..865053b380f 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java @@ -86,6 +86,7 @@ public class MissingTests extends ElasticsearchIntegrationTest { } indexRandom(true, builders.toArray(new IndexRequestBuilder[builders.size()])); + ensureGreen(); // wait until we are ready to serve requests } diff --git a/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java b/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java index 38ea10fc89f..3c87aceec15 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java @@ -72,7 +72,7 @@ public abstract class AbstractNumericTests extends ElasticsearchIntegrationTest .endObject())); } indexRandom(true, builders); - + ensureGreen(); // wait until we are ready to serve requests } public abstract void testEmptyAggregation() throws Exception;