From 9bacfe227dda6d12efb7942eff7452f5d525611b Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Tue, 20 May 2025 21:52:58 +1000 Subject: [PATCH] [Test] Fix testContentRangeValidation (#128188) Ensure sufficent bytes for the start position. --- .../repositories/s3/S3RetryingInputStreamTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java index e735bae25f662..c4cd31f444144 100644 --- a/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java +++ b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java @@ -120,7 +120,7 @@ public void testReadAfterBlobLengthThrowsRequestedRangeNotSatisfiedException() t } public void testContentRangeValidation() throws IOException { - final byte[] bytes = randomByteArrayOfLength(between(100, 200)); + final byte[] bytes = randomByteArrayOfLength(between(101, 200)); final int position = between(0, 100); final int length = between(1, 100); try (var stream = createInputStream(bytes, position, length)) {