Skip to content

Commit a03e166

Browse files
committed
test cleanup catch exception
1 parent 2ce8c00 commit a03e166

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/BaseS3RegressionTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ static void setup() throws InterruptedException, IOException {
9090
public void methodCleanup() {
9191
bucketCleanup.forEach((bt, keys) -> {
9292
String bucket = bucketForType(bt);
93-
keys.forEach(k -> s3.deleteObject(r -> r.bucket(bucket).key(k)));
93+
keys.forEach(k -> {
94+
try {
95+
s3.deleteObject(r -> r.bucket(bucket).key(k));
96+
} catch (Exception e) {
97+
LOG.error(() -> String.format("Error in cleaning for bucket %s, key: %s: %s", bucket, k, e.getMessage()));
98+
}
99+
});
94100
});
95101

96102
bucketCleanup.clear();

0 commit comments

Comments
 (0)