Skip to content

Apache Lucene open-source search software

Fixup TestLongValueFacetCounts after GITHUB#11744. (#12192)

Greg Miller0651d25713dd
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java b/lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java
index 58c232c8c6e..a35b76ff1d5 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java
@@ -394,7 +394,7 @@ public class TestLongValueFacetCounts extends FacetTestCase {
if (random().nextBoolean()) {
topN = docCount;
} else {
- topN = random().nextInt(docCount);
+ topN = random().nextInt(1, docCount);
}
if (VERBOSE) {
System.out.println(" topN=" + topN);
@@ -486,7 +486,7 @@ public class TestLongValueFacetCounts extends FacetTestCase {
if (random().nextBoolean()) {
topN = docCount;
} else {
- topN = random().nextInt(docCount);
+ topN = random().nextInt(1, docCount);
}
actual = facetCounts.getTopChildren(topN, "field");
assertSame(
@@ -657,7 +657,7 @@ public class TestLongValueFacetCounts extends FacetTestCase {
if (random().nextBoolean()) {
topN = docCount;
} else {
- topN = random().nextInt(docCount);
+ topN = random().nextInt(1, docCount);
}
if (VERBOSE) {
System.out.println(" topN=" + topN);
@@ -727,7 +727,7 @@ public class TestLongValueFacetCounts extends FacetTestCase {
if (random().nextBoolean()) {
topN = docCount;
} else {
- topN = random().nextInt(docCount);
+ topN = random().nextInt(1, docCount);
}
actual = facetCounts.getTopChildren(topN, "field");
assertSame(