diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/histogram/DateHistogramAggregatorTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/histogram/DateHistogramAggregatorTests.java index a3eec90a8f252..0f16bb631dd5e 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/histogram/DateHistogramAggregatorTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/histogram/DateHistogramAggregatorTests.java @@ -171,7 +171,6 @@ public void testMatchAllDocs() throws IOException { ); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/57168") public void testAsSubAgg() throws IOException { KeywordFieldMapper.KeywordFieldType k1ft = new KeywordFieldMapper.KeywordFieldType(); k1ft.setName("k1"); diff --git a/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java b/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java index 79587d9828b4b..b26f1d2fef1d1 100644 --- a/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java @@ -557,12 +557,7 @@ protected void tes try (DirectoryReader unwrapped = DirectoryReader.open(directory); IndexReader indexReader = wrapDirectoryReader(unwrapped)) { - /* - * Only allow the randomized testing to wrap the reader if - * the test didn't explicitly wrap the reader. - */ - boolean maybeWrap = unwrapped == indexReader; - IndexSearcher indexSearcher = newSearcher(indexReader, maybeWrap, true); + IndexSearcher indexSearcher = newIndexSearcher(indexReader); V agg = searchAndReduce(indexSearcher, query, aggregationBuilder, fieldTypes); verify.accept(agg);