File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3 Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1013,7 +1013,6 @@ interface FailingHandlerFactory {
10131013 }
10141014 }
10151015
1016- @ AwaitsFix (bugUrl = "TODO NOMERGE" )
10171016 public void testSuppressedDeletionErrorsAreCapped () {
10181017 final TimeValue readTimeout = TimeValue .timeValueMillis (randomIntBetween (100 , 500 ));
10191018 int maxBulkDeleteSize = randomIntBetween (1 , 10 );
@@ -1043,8 +1042,15 @@ public void testSuppressedDeletionErrorsAreCapped() {
10431042 "deletion should not succeed" ,
10441043 () -> blobContainer .deleteBlobsIgnoringIfNotExists (randomPurpose (), blobs .iterator ())
10451044 );
1046- logger .info ("--> deletion exception" , exception );
1047- assertThat (exception .getCause ().getSuppressed ().length , lessThan (S3BlobStore .MAX_DELETE_EXCEPTIONS ));
1045+
1046+ var sdkGeneratedExceptions = 0 ;
1047+ final var innerExceptions = exception .getCause ().getSuppressed ();
1048+ for (final var innerException : innerExceptions ) {
1049+ if (innerException instanceof SdkClientException && innerException .getMessage ().startsWith ("Request attempt " )) {
1050+ sdkGeneratedExceptions += 1 ;
1051+ }
1052+ }
1053+ assertThat (innerExceptions .length - sdkGeneratedExceptions , lessThan (S3BlobStore .MAX_DELETE_EXCEPTIONS ));
10481054 }
10491055
10501056 private static boolean isMultiDeleteRequest (HttpExchange exchange ) {
You can’t perform that action at this time.
0 commit comments