Skip to content

Commit 42ab562

Browse files
committed
feedback
1 parent 3d6c39e commit 42ab562

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3RepositoryThirdPartyTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ public void testReadFromPositionLargerThanBlobLength() {
257257
+ ']'
258258
)
259259
);
260-
261-
var cause = exception.getRootCause();
262-
assertThat(cause, instanceOf(AmazonS3Exception.class));
263-
assertThat(((AmazonS3Exception) cause).getStatusCode(), equalTo(RestStatus.REQUESTED_RANGE_NOT_SATISFIED.getStatus()));
260+
assertThat(
261+
asInstanceOf(AmazonS3Exception.class, exception.getRootCause()).getStatusCode(),
262+
equalTo(RestStatus.REQUESTED_RANGE_NOT_SATISFIED.getStatus())
263+
);
264264
}
265265
}

0 commit comments

Comments
 (0)