diff --git a/test/fixtures/s3-fixture/src/test/java/fixture/s3/S3HttpHandlerTests.java b/test/fixtures/s3-fixture/src/test/java/fixture/s3/S3HttpHandlerTests.java index aa673e9191e8e..0188200186103 100644 --- a/test/fixtures/s3-fixture/src/test/java/fixture/s3/S3HttpHandlerTests.java +++ b/test/fixtures/s3-fixture/src/test/java/fixture/s3/S3HttpHandlerTests.java @@ -110,7 +110,7 @@ public void testGetWithBytesRange() { handleRequest(handler, "GET", blobPath, BytesArray.EMPTY, bytesRangeHeader(0, end)) ); - var start = randomFrom(blobBytes.length(), Integer.MAX_VALUE - 1); + var start = randomIntBetween(blobBytes.length(), Integer.MAX_VALUE - 1); end = randomIntBetween(start, Integer.MAX_VALUE); assertEquals( "Invalid Range: bytes=" + start + '-' + end, @@ -118,7 +118,7 @@ public void testGetWithBytesRange() { handleRequest(handler, "GET", blobPath, BytesArray.EMPTY, bytesRangeHeader(start, end)) ); - start = randomFrom(2, Integer.MAX_VALUE - 1); + start = randomIntBetween(2, Integer.MAX_VALUE - 1); end = randomIntBetween(0, start - 1); assertEquals( "Weird Valid Range: bytes=" + start + '-' + end,