mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Fix usage of randomIntBetween() in testWriteBlobWithRetries (#46380)
This commit fixes the usage of randomIntBetween() in the test testWriteBlobWithRetries, when the test generates a random array of a single byte.
This commit is contained in:
parent
42ada88c5d
commit
2290865559
@ -206,7 +206,7 @@ public class S3BlobContainerRetriesTests extends ESTestCase {
|
||||
|
||||
if (randomBoolean()) {
|
||||
if (randomBoolean()) {
|
||||
Streams.readFully(exchange.getRequestBody(), new byte[randomIntBetween(1, bytes.length - 1)]);
|
||||
Streams.readFully(exchange.getRequestBody(), new byte[randomIntBetween(1, Math.max(1, bytes.length - 1))]);
|
||||
} else {
|
||||
Streams.readFully(exchange.getRequestBody());
|
||||
exchange.sendResponseHeaders(randomFrom(HttpStatus.SC_INTERNAL_SERVER_ERROR, HttpStatus.SC_BAD_GATEWAY,
|
||||
|
Loading…
x
Reference in New Issue
Block a user