essobedo commented on code in PR #3729:
URL: https://github.com/apache/camel-quarkus/pull/3729#discussion_r850306156
##########
integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/s3/it/Aws2S3Test.java:
##########
@@ -164,47 +164,51 @@ public void testKms() throws Exception {
final String oid = UUID.randomUUID().toString();
final String blobContent = "Hello KMS " + oid;
- // Create
- RestAssured.given()
- .contentType(ContentType.TEXT)
- .body(blobContent)
- .post("/aws2/s3/object/" + oid + "?useKms=true")
- .then()
- .statusCode(201);
-
- // Read
- RestAssured.get("/aws2/s3/object/" + oid + "?useKms=true")
- .then()
- .statusCode(200)
- .body(is(blobContent));
+ try {
+ // Create
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(blobContent)
+ .post("/aws2/s3/object/" + oid + "?useKms=true")
+ .then()
+ .statusCode(201);
- // Delete
- deleteObject(oid);
+ // Read
+ RestAssured.get("/aws2/s3/object/" + oid + "?useKms=true")
+ .then()
+ .statusCode(200)
+ .body(is(blobContent));
+ } finally {
+ // Delete
+ deleteObject(oid);
Review Comment:
Should be done in an AfterEach method instead of a finally block
--
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]