From 2a31f2835cff11ad0d8fa39834eb17db8605bae7 Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Mon, 6 Nov 2023 08:41:06 -0500 Subject: [PATCH] #12506: switch to TestUtil for random ints to be consistent with 9.x backport where Java 11 doesn't have this API --- .../src/test/org/apache/lucene/index/TestByteSlicePool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestByteSlicePool.java b/lucene/core/src/test/org/apache/lucene/index/TestByteSlicePool.java index 30cc11aa31c..4e7593960da 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestByteSlicePool.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestByteSlicePool.java @@ -226,7 +226,7 @@ public class TestByteSlicePool extends LuceneTestCase { ByteBlockPool blockPool = new ByteBlockPool(new ByteBlockPool.DirectAllocator()); 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]; SliceReader[] sliceReaders = new SliceReader[n];