Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed Mar 11, 2024
1 parent ab28714 commit cf867e0
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ public void testGetWithBytesRange() {
final var blobBytes = randomBytesReference(256);
assertEquals(RestStatus.OK, handleRequest(handler, "PUT", blobPath, blobBytes).status());

assertEquals(
"No Range",
new TestHttpResponse(RestStatus.OK, blobBytes, null),
handleRequest(handler, "GET", blobPath)
);
assertEquals("No Range", new TestHttpResponse(RestStatus.OK, blobBytes, null), handleRequest(handler, "GET", blobPath));

var end = blobBytes.length();
assertEquals(
Expand All @@ -110,7 +106,7 @@ public void testGetWithBytesRange() {
handleRequest(handler, "GET", blobPath, BytesArray.EMPTY, bytesRangeHeader(0, end))
);

var start = randomFrom(blobBytes.length(), Integer.MAX_VALUE - 1 );
var start = randomFrom(blobBytes.length(), Integer.MAX_VALUE - 1);
end = randomIntBetween(start, Integer.MAX_VALUE);
assertEquals(
"Invalid Range: bytes=" + start + '-' + end,
Expand Down Expand Up @@ -339,6 +335,7 @@ private record TestHttpResponse(RestStatus status, BytesReference body, @Nullabl
TestHttpResponse(RestStatus status, String body) {
this(status, body, null);
}

TestHttpResponse(RestStatus status, String body, @Nullable String etag) {
this(status, new BytesArray(body.getBytes(StandardCharsets.UTF_8)), etag);
}
Expand Down

0 comments on commit cf867e0

Please sign in to comment.