balazsgerner commented on code in PR #8295:
URL: https://github.com/apache/nifi/pull/8295#discussion_r1467694135
##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/ITPutS3Object.java:
##########
@@ -88,6 +100,74 @@ public static void setupClass() {
kmsKeyId = getKMSKey();
}
+ @AfterEach
+ public void tearDown() {
+ // clear bucket content
+ AmazonS3 client = getClient();
+ List<S3ObjectSummary> objectSummaries =
client.listObjects(BUCKET_NAME).getObjectSummaries();
+ if (!objectSummaries.isEmpty()) {
+ client.deleteObjects(new DeleteObjectsRequest(BUCKET_NAME)
+ .withKeys(objectSummaries.stream()
+ .map(S3ObjectSummary::getKey)
+ .toArray(String[]::new)));
+ }
Review Comment:
Fixed in
[7b26f3b](https://github.com/apache/nifi/pull/8295/commits/7b26f3b4fd6641388eebf4ac0d59f17aa92a6a0e)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]