Browse Source

Remove another outdated assertion from SearchQueryThenFetchAsyncActionTests (#122086)

Same reasoning as in 2b410c44eb8fc684d3986247a49f9696b44f2d4c,
with the now weaker ordering guarantees from optimizations this
assertion stopped being reliable.
Armin Braun 8 months ago
parent
commit
54613656c3

+ 0 - 3
muted-tests.yml

@@ -343,9 +343,6 @@ tests:
   issue: https://github.com/elastic/elasticsearch/issues/121625
 - class: org.elasticsearch.xpack.searchablesnapshots.hdfs.SecureHdfsSearchableSnapshotsIT
   issue: https://github.com/elastic/elasticsearch/issues/121967
-- class: org.elasticsearch.action.search.SearchQueryThenFetchAsyncActionTests
-  method: testBottomFieldSort
-  issue: https://github.com/elastic/elasticsearch/issues/121503
 - class: org.elasticsearch.xpack.application.CohereServiceUpgradeIT
   issue: https://github.com/elastic/elasticsearch/issues/121537
 - class: org.elasticsearch.xpack.restart.FullClusterRestartIT

+ 2 - 6
server/src/test/java/org/elasticsearch/action/search/SearchQueryThenFetchAsyncActionTests.java

@@ -219,12 +219,8 @@ public class SearchQueryThenFetchAsyncActionTests extends ESTestCase {
             if (withScroll) {
                 assertFalse(canReturnNullResponse.get());
                 assertThat(numWithTopDocs.get(), equalTo(0));
-            } else {
-                if (withCollapse) {
-                    assertThat(numWithTopDocs.get(), equalTo(0));
-                } else {
-                    assertThat(numWithTopDocs.get(), greaterThanOrEqualTo(1));
-                }
+            } else if (withCollapse) {
+                assertThat(numWithTopDocs.get(), equalTo(0));
             }
             SearchPhaseController.ReducedQueryPhase phase = action.results.reduce();
             assertThat(phase.numReducePhases(), greaterThanOrEqualTo(1));