From 699044bce9d07c062bc0406639d6158ba132cae2 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Sat, 22 Mar 2014 19:31:19 +0100 Subject: [PATCH] [TEST] Assert search response in MinDocCountTests#testMinDocCountOnTerms --- .../search/aggregations/bucket/MinDocCountTests.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java b/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java index a3e28b2414c..beeaa75239e 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java @@ -42,6 +42,8 @@ import java.util.regex.Pattern; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.search.aggregations.AggregationBuilders.*; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; + public class MinDocCountTests extends ElasticsearchIntegrationTest { @@ -273,6 +275,8 @@ public class MinDocCountTests extends ElasticsearchIntegrationTest { .size(cardinality + randomInt(10)) .minDocCount(0)) .execute().actionGet(); + assertAllSuccessful(allTermsResponse); + final Terms allTerms = allTermsResponse.getAggregations().get("terms"); assertEquals(cardinality, allTerms.getBuckets().size()); @@ -289,6 +293,7 @@ public class MinDocCountTests extends ElasticsearchIntegrationTest { .shardSize(cardinality + randomInt(10)) .minDocCount(minDocCount)) .execute().actionGet(); + assertAllSuccessful(response); assertSubset(allTerms, (Terms) response.getAggregations().get("terms"), minDocCount, size, include); }