From 6f763bded9cd874392c99e52c988a9bf4c6e5c70 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 10 Sep 2014 11:19:10 +0200 Subject: [PATCH] Test: Enabled ChildrenTests#testParentWithMultipleBuckets with more logging --- .../search/aggregations/bucket/ChildrenTests.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java b/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java index 0b3f35c855b..43b78e083e8 100644 --- a/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java +++ b/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java @@ -18,7 +18,6 @@ */ package org.elasticsearch.search.aggregations.bucket; -import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.search.SearchHit; @@ -152,7 +151,6 @@ public class ChildrenTests extends ElasticsearchIntegrationTest { } @Test - @LuceneTestCase.AwaitsFix(bugUrl = "Order is incorrect, c is sometimes before a...") public void testParentWithMultipleBuckets() throws Exception { SearchResponse searchResponse = client().prepareSearch("test") .setQuery(matchQuery("randomized", false)) @@ -166,6 +164,16 @@ public class ChildrenTests extends ElasticsearchIntegrationTest { Terms categoryTerms = searchResponse.getAggregations().get("category"); assertThat(categoryTerms.getBuckets().size(), equalTo(3)); + for (Terms.Bucket bucket : categoryTerms.getBuckets()) { + logger.info("bucket=" + bucket.getKey()); + Children childrenBucket = bucket.getAggregations().get("to_comment"); + TopHits topHits = childrenBucket.getAggregations().get("top_comments"); + logger.info("total_hits={}", topHits.getHits().getTotalHits()); + for (SearchHit searchHit : topHits.getHits()) { + logger.info("hit= {} {}", searchHit.sortValues()[0], searchHit.getId()); + } + } + Terms.Bucket categoryBucket = categoryTerms.getBucketByKey("a"); assertThat(categoryBucket.getKey(), equalTo("a")); assertThat(categoryBucket.getDocCount(), equalTo(3l));