Skip to content

Commit 2707970

Browse files
authored
fix nightly test apache#14260 request all hits (apache#14263)
TestSsDvMultiRangeQuery#testDuelWithStandardDisjunction
1 parent 0a7f703 commit 2707970

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lucene/sandbox/src/test/org/apache/lucene/sandbox/search/TestSsDvMultiRangeQuery.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ public void testDuelWithStandardDisjunction() throws IOException {
7272
}
7373

7474
long[] scratch = new long[dims];
75-
for (int i = 0; i < (LuceneTestCase.TEST_NIGHTLY ? atLeast(1000) : 100); i++) {
75+
int maxDocs = LuceneTestCase.TEST_NIGHTLY ? atLeast(1000) : 100;
76+
for (int i = 0; i < maxDocs; i++) {
7677
int numPoints = singleton ? 1 : RandomNumbers.randomIntBetween(random(), 1, 10);
7778
Document doc = new Document();
7879
for (int j = 0; j < numPoints; j++) {
@@ -124,9 +125,9 @@ public void testDuelWithStandardDisjunction() throws IOException {
124125
Query query1 = builder1.build();
125126
Query query2 = builder2.build();
126127
Query query3 = builder3.build();
127-
TopDocs result1 = searcher.search(query1, 100, Sort.INDEXORDER);
128-
TopDocs result2 = searcher.search(query2, 100, Sort.INDEXORDER);
129-
TopDocs result3 = searcher.search(query3, 100, Sort.INDEXORDER);
128+
TopDocs result1 = searcher.search(query1, maxDocs, Sort.INDEXORDER);
129+
TopDocs result2 = searcher.search(query2, maxDocs, Sort.INDEXORDER);
130+
TopDocs result3 = searcher.search(query3, maxDocs, Sort.INDEXORDER);
130131
assertEquals(result2.totalHits, result1.totalHits);
131132
assertEquals(result2.totalHits, result3.totalHits);
132133
assertEquals(result2.scoreDocs.length, result1.scoreDocs.length);

0 commit comments

Comments
 (0)