From b91b4136aff239f45e074fd6603c06ec7c296f43 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Wed, 4 Sep 2024 16:06:19 +0200 Subject: [PATCH] Reduce size of queue in TestBoolean2#testRandomQueries (#13713) The queue is created as 1000 * mulFactor, but the test succeeds without the 1000 factor. That causes out of memories as the mulFactor can be as high as 4096 in some cases, and then each slice will get a collector with a queue of size 1000 * mulFactor. Only the allocation of such queue makes the test go OOM. Closes #11754 --- .../src/test/org/apache/lucene/search/TestBoolean2.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java b/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java index b0634e56da4..1b27683a251 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java @@ -403,12 +403,8 @@ public class TestBoolean2 extends LuceneTestCase { bigSearcher.count(q3.build())); // test diff (randomized) scorers produce the same results on bigSearcher as well - hits1 = - bigSearcher.search(q1, new TopFieldCollectorManager(sort, 1000 * mulFactor, 1)) - .scoreDocs; - hits2 = - bigSearcher.search(q1, new TopFieldCollectorManager(sort, 1000 * mulFactor, 1)) - .scoreDocs; + hits1 = bigSearcher.search(q1, new TopFieldCollectorManager(sort, mulFactor, 1)).scoreDocs; + hits2 = bigSearcher.search(q1, new TopFieldCollectorManager(sort, mulFactor, 1)).scoreDocs; CheckHits.checkEqual(q1, hits1, hits2); }