From d3fa101fa78f75d657748aea5d954ea73cd1aeee Mon Sep 17 00:00:00 2001 From: Benjamin Trent <4357155+benwtrent@users.noreply.github.com> Date: Fri, 22 Mar 2024 09:27:06 -0400 Subject: [PATCH] Fix test failure #106647 --- .../search/query/PartialHitCountCollectorTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/search/query/PartialHitCountCollectorTests.java b/server/src/test/java/org/elasticsearch/search/query/PartialHitCountCollectorTests.java index c7967f0de5411..8d984880df488 100644 --- a/server/src/test/java/org/elasticsearch/search/query/PartialHitCountCollectorTests.java +++ b/server/src/test/java/org/elasticsearch/search/query/PartialHitCountCollectorTests.java @@ -120,7 +120,7 @@ public void testHitCountFromWeightDoesNotEarlyTerminate() throws IOException { public void testCollectedHitCount() throws Exception { Query query = new NonCountingTermQuery(new Term("string", "a1")); - int threshold = randomIntBetween(1, 10000); + int threshold = randomIntBetween(2, 10000); // there's one doc matching the query: any totalHitsThreshold greater than or equal to 1 will not cause early termination CollectorManager collectorManager = createCollectorManager(new HitsThresholdChecker(threshold)); Result result = searcher.search(query, collectorManager);