Skip to content

Commit eb812c8

Browse files
committed
Removed flaky test. Looks like randomisation makes these assertions unreliable.
This test is superfluous - it was added to address #32770 but it later turned out there was an existing test that just required a fix to provide the missing test coverage. Closes #32855
1 parent a1cff86 commit eb812c8

File tree

1 file changed

+0
-31
lines changed
  • client/rest-high-level/src/test/java/org/elasticsearch/client

1 file changed

+0
-31
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/SearchIT.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@
5959
import org.elasticsearch.search.aggregations.BucketOrder;
6060
import org.elasticsearch.search.aggregations.bucket.range.Range;
6161
import org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder;
62-
import org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms;
63-
import org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder;
64-
import org.elasticsearch.search.aggregations.bucket.significant.heuristics.PercentageScore;
6562
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
6663
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
6764
import org.elasticsearch.search.aggregations.matrix.stats.MatrixStats;
@@ -271,34 +268,6 @@ public void testSearchWithTermsAgg() throws IOException {
271268
assertEquals(0, type2.getAggregations().asList().size());
272269
}
273270

274-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/32855")
275-
public void testSearchWithSignificantTermsAgg() throws IOException {
276-
SearchRequest searchRequest = new SearchRequest();
277-
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
278-
searchSourceBuilder.query(new MatchQueryBuilder("num","50"));
279-
searchSourceBuilder.aggregation(new SignificantTermsAggregationBuilder("agg1", ValueType.STRING)
280-
.field("type.keyword")
281-
.minDocCount(1)
282-
.significanceHeuristic(new PercentageScore()));
283-
searchSourceBuilder.size(0);
284-
searchRequest.source(searchSourceBuilder);
285-
SearchResponse searchResponse = execute(searchRequest, highLevelClient()::search, highLevelClient()::searchAsync);
286-
assertSearchHeader(searchResponse);
287-
assertNull(searchResponse.getSuggest());
288-
assertEquals(Collections.emptyMap(), searchResponse.getProfileResults());
289-
assertEquals(0, searchResponse.getHits().getHits().length);
290-
assertEquals(0f, searchResponse.getHits().getMaxScore(), 0f);
291-
SignificantTerms significantTermsAgg = searchResponse.getAggregations().get("agg1");
292-
assertEquals("agg1", significantTermsAgg.getName());
293-
assertEquals(1, significantTermsAgg.getBuckets().size());
294-
SignificantTerms.Bucket type1 = significantTermsAgg.getBucketByKey("type1");
295-
assertEquals(1, type1.getDocCount());
296-
assertEquals(1, type1.getSubsetDf());
297-
assertEquals(1, type1.getSubsetSize());
298-
assertEquals(3, type1.getSupersetDf());
299-
assertEquals(1d/3d, type1.getSignificanceScore(), 0d);
300-
}
301-
302271
public void testSearchWithRangeAgg() throws IOException {
303272
{
304273
SearchRequest searchRequest = new SearchRequest();

0 commit comments

Comments
 (0)