Fix test failure on empty paged bytes.

This commit is contained in:
Adrien Grand 2023-11-20 09:23:26 +01:00
parent b3ef869681
commit 194a500323
1 changed files with 2 additions and 2 deletions

View File

@ -116,9 +116,9 @@ public class TestPagedBytes extends LuceneTestCase {
final DataOutput out = p.getDataOutput(); final DataOutput out = p.getDataOutput();
final int numBytes; final int numBytes;
if (TEST_NIGHTLY) { if (TEST_NIGHTLY) {
numBytes = random().nextInt(10_000_000); numBytes = TestUtil.nextInt(random(), 1, 10_000_000);
} else { } else {
numBytes = random().nextInt(1_000_000); numBytes = TestUtil.nextInt(random(), 1, 1_000_000);
} }
final byte[] answer = new byte[numBytes]; final byte[] answer = new byte[numBytes];