#12506: switch to TestUtil for random ints to be consistent with 9.x backport where Java 11 doesn't have this API

This commit is contained in:
Mike McCandless 2023-11-06 08:41:06 -05:00
parent 6aed68f17a
commit 2a31f2835c
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ public class TestByteSlicePool extends LuceneTestCase {
ByteBlockPool blockPool = new ByteBlockPool(new ByteBlockPool.DirectAllocator()); ByteBlockPool blockPool = new ByteBlockPool(new ByteBlockPool.DirectAllocator());
ByteSlicePool slicePool = new ByteSlicePool(blockPool); ByteSlicePool slicePool = new ByteSlicePool(blockPool);
int n = random().nextInt(2, 4); // 2 or 3 writers and readers int n = TestUtil.nextInt(random(), 2, 3); // 2 or 3 writers and readers
SliceWriter[] sliceWriters = new SliceWriter[n]; SliceWriter[] sliceWriters = new SliceWriter[n];
SliceReader[] sliceReaders = new SliceReader[n]; SliceReader[] sliceReaders = new SliceReader[n];