diff --git a/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java b/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java index e9a0154e141..a632bc9f211 100644 --- a/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java +++ b/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java @@ -124,7 +124,7 @@ public class TestRangeTree extends LuceneTestCase { // We rely on docID order: iwc.setMergePolicy(newLogMergePolicy()); int maxPointsInLeaf = TestUtil.nextInt(random(), 16, 2048); - int maxPointsSortInHeap = TestUtil.nextInt(random(), 1024, 1024*1024); + int maxPointsSortInHeap = TestUtil.nextInt(random(), maxPointsInLeaf, 1024*1024); Codec codec = TestUtil.alwaysDocValuesFormat(new RangeTreeDocValuesFormat(maxPointsInLeaf, maxPointsSortInHeap)); iwc.setCodec(codec); RandomIndexWriter w = new RandomIndexWriter(random(), dir, iwc);