Update azure-storage-blob to 12.15.0: fix test flakiness (#2795)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
parent
dd24e17ea6
commit
0244b2a2df
|
@ -231,8 +231,7 @@ public class AzureBlobContainerRetriesTests extends OpenSearchTestCase {
|
|||
exchange.getResponseHeaders().add("Content-Type", "application/octet-stream");
|
||||
exchange.getResponseHeaders().add("Content-Length", String.valueOf(length));
|
||||
exchange.getResponseHeaders().add("x-ms-blob-type", "blockblob");
|
||||
exchange.getResponseHeaders()
|
||||
.add("Content-Range", String.format("bytes %d-%d/%d", rangeStart, bytes.length, bytes.length));
|
||||
exchange.getResponseHeaders().add("Content-Range", "bytes " + rangeStart + "-" + bytes.length + "/" + bytes.length);
|
||||
exchange.sendResponseHeaders(RestStatus.OK.getStatus(), length);
|
||||
exchange.getResponseBody().write(bytes, rangeStart, length);
|
||||
return;
|
||||
|
@ -282,7 +281,7 @@ public class AzureBlobContainerRetriesTests extends OpenSearchTestCase {
|
|||
exchange.getResponseHeaders().add("Content-Type", "application/octet-stream");
|
||||
exchange.getResponseHeaders().add("Content-Length", String.valueOf(length));
|
||||
exchange.getResponseHeaders()
|
||||
.add("Content-Range", String.format("bytes %d-%d/%d", rangeStart, rangeEnd.get(), bytes.length));
|
||||
.add("Content-Range", "bytes " + rangeStart + "-" + rangeEnd.get() + "/" + bytes.length);
|
||||
exchange.getResponseHeaders().add("x-ms-blob-type", "blockblob");
|
||||
exchange.sendResponseHeaders(RestStatus.OK.getStatus(), length);
|
||||
exchange.getResponseBody().write(bytes, rangeStart, length);
|
||||
|
|
|
@ -157,7 +157,9 @@ public class AzureHttpHandler implements HttpHandler {
|
|||
exchange.getResponseHeaders().add("Content-Length", String.valueOf(length));
|
||||
exchange.getResponseHeaders().add("x-ms-blob-type", "blockblob");
|
||||
exchange.getResponseHeaders().add("x-ms-request-server-encrypted", "false");
|
||||
exchange.getResponseHeaders().add("Content-Range", String.format("bytes %d-%d/%d", start, Math.min(end, length), length));
|
||||
exchange.getResponseHeaders()
|
||||
.add("Content-Range", "bytes " + start + "-" + Math.min(end, length) + "/" + blob.length());
|
||||
|
||||
exchange.sendResponseHeaders(RestStatus.OK.getStatus(), length);
|
||||
exchange.getResponseBody().write(blob.toBytesRef().bytes, start, length);
|
||||
|
||||
|
|
Loading…
Reference in New Issue