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
This commit is contained in:
Luca Cavanna 2024-09-04 16:06:19 +02:00 committed by GitHub
parent c21bc5405b
commit b91b4136af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}