aldettinger commented on a change in pull request #3279:
URL: https://github.com/apache/camel-quarkus/pull/3279#discussion_r745805878
##########
File path:
integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/Aws2S3Test.java
##########
@@ -36,6 +37,19 @@
@QuarkusTestResource(Aws2TestResource.class)
class Aws2S3Test {
+ @AfterEach
+ public void after() {
+
+ // Make sure all create objects have been deleted
+ final String[] objects = RestAssured.given()
+ .get("/aws2/s3/object-keys")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body().as(String[].class);
+ Assertions.assertTrue(objects.length == 0);
Review comment:
Is it good idea to put assertions in @AfterEach ?
Would each test be successful only when objects.length ==0, maybe we could
assert at the end of each test ?
Would objects.length==0 show a situation where the tests execution is not
satisfying, maybe throwing an exception is better ?
--
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]