You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gs...@apache.org on 2022/07/20 21:44:45 UTC

[lucene] branch branch_9x updated: Fix TestDisiPriorityQueue test bug

This is an automated email from the ASF dual-hosted git repository.

gsmiller pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new a7fb8d6ce76 Fix TestDisiPriorityQueue test bug
a7fb8d6ce76 is described below

commit a7fb8d6ce76a4011b3bc2f03bbb7b0d4b4e876dc
Author: Greg Miller <gs...@gmail.com>
AuthorDate: Wed Jul 20 14:19:47 2022 -0700

    Fix TestDisiPriorityQueue test bug
---
 .../core/src/test/org/apache/lucene/search/TestDisiPriorityQueue.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/test/org/apache/lucene/search/TestDisiPriorityQueue.java b/lucene/core/src/test/org/apache/lucene/search/TestDisiPriorityQueue.java
index 94daa2fad71..1a0356c8c9d 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestDisiPriorityQueue.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestDisiPriorityQueue.java
@@ -30,7 +30,7 @@ public class TestDisiPriorityQueue extends LuceneTestCase {
   public void testRandom() throws Exception {
     Random r = random();
 
-    int size = r.nextInt(TEST_NIGHTLY ? 1000 : 10);
+    int size = RandomNumbers.randomIntBetween(random(), 1, TEST_NIGHTLY ? 1000 : 10);
     DisiWrapper[] all = new DisiWrapper[size];
     for (int i = 0; i < size; i++) {
       DocIdSetIterator it = randomDisi(r);