mirror of https://github.com/apache/lucene.git
LUCENE-9620: Fix test bug.
This commit is contained in:
parent
075d801abe
commit
4bcd64c5ed
|
@ -742,7 +742,7 @@ public class TestBooleanQuery extends LuceneTestCase {
|
||||||
Directory dir = newDirectory();
|
Directory dir = newDirectory();
|
||||||
RandomIndexWriter w = new RandomIndexWriter(random(), dir);
|
RandomIndexWriter w = new RandomIndexWriter(random(), dir);
|
||||||
|
|
||||||
int randomNumDocs = random().nextInt(500);
|
int randomNumDocs = TestUtil.nextInt(random(), 10, 100);
|
||||||
int numMatchingDocs = 0;
|
int numMatchingDocs = 0;
|
||||||
|
|
||||||
for (int i = 0; i < randomNumDocs; i++) {
|
for (int i = 0; i < randomNumDocs; i++) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.apache.lucene.store.Directory;
|
||||||
import org.apache.lucene.util.BytesRef;
|
import org.apache.lucene.util.BytesRef;
|
||||||
import org.apache.lucene.util.IOUtils;
|
import org.apache.lucene.util.IOUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
|
import org.apache.lucene.util.TestUtil;
|
||||||
|
|
||||||
public class TestTermQuery extends LuceneTestCase {
|
public class TestTermQuery extends LuceneTestCase {
|
||||||
|
|
||||||
|
@ -108,7 +109,7 @@ public class TestTermQuery extends LuceneTestCase {
|
||||||
Directory dir = newDirectory();
|
Directory dir = newDirectory();
|
||||||
RandomIndexWriter w = new RandomIndexWriter(random(), dir);
|
RandomIndexWriter w = new RandomIndexWriter(random(), dir);
|
||||||
|
|
||||||
int randomNumDocs = random().nextInt(500);
|
int randomNumDocs = TestUtil.nextInt(random(), 10, 100);
|
||||||
int numMatchingDocs = 0;
|
int numMatchingDocs = 0;
|
||||||
|
|
||||||
for (int i = 0; i < randomNumDocs; i++) {
|
for (int i = 0; i < randomNumDocs; i++) {
|
||||||
|
|
Loading…
Reference in New Issue