Skip to content

Commit

Permalink
Fix ESIndexInputTestCase#randomReadAndSlice (#93227)
Browse files Browse the repository at this point in the history
In #93205 we fixed a bug in `ByteArrayIndexInput` but accidentally
reduced the coverage of the test suite with a supposedly-temporary
change for debugging purposes. This commit brings the test suite back up
to full strength again.

This was fixed in `main` by #93208, but most of that change is not for
backporting.
  • Loading branch information
DaveCTurner authored Jan 25, 2023
1 parent ac60b59 commit 9695b3c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected byte[] randomReadAndSlice(IndexInput indexInput, int length) throws IO
int readPos = (int) indexInput.getFilePointer();
byte[] output = new byte[length];
while (readPos < length) {
final var readStrategy = randomFrom(2, 6);
final var readStrategy = between(0, 8);
switch (readStrategy) {
case 0, 1, 2, 3:
if (length - readPos >= Long.BYTES && readStrategy <= 0) {
Expand Down

0 comments on commit 9695b3c

Please sign in to comment.