This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new a17b490  fix  Aws2S3Test could fail with real AWS S3 service caused by 
bucket name conflicts #3163
a17b490 is described below

commit a17b49073e210d73e216ca47b535d59eb4cf6eec
Author: Freeman Fang <[email protected]>
AuthorDate: Wed Oct 6 12:04:37 2021 -0400

    fix  Aws2S3Test could fail with real AWS S3 service caused by bucket name 
conflicts #3163
---
 .../java/org/apache/camel/quarkus/component/aws2/Aws2S3Test.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/Aws2S3Test.java
 
b/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/Aws2S3Test.java
index 2113683..689c216 100644
--- 
a/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/Aws2S3Test.java
+++ 
b/integration-test-groups/aws2/aws2-s3/src/test/java/org/apache/camel/quarkus/component/aws2/Aws2S3Test.java
@@ -154,7 +154,7 @@ class Aws2S3Test {
         final String oid1 = UUID.randomUUID().toString();
         final String oid2 = UUID.randomUUID().toString();
         final String blobContent = "Hello " + oid1;
-        final String bucket = "mycamel";
+        final String bucket = "mycamel" + UUID.randomUUID().toString();
 
         // Create
         RestAssured.given()
@@ -196,20 +196,20 @@ class Aws2S3Test {
 
     @Test
     void deleteBucket() throws Exception {
-        final String bucket = "mycamel-delete";
+        final String bucket = "mycamel-delete" + UUID.randomUUID().toString();
 
         String[] objects = getAllObjects(bucket);
         Assertions.assertTrue(objects.length == 0);
 
         String[] buckets = getAllBuckets();
-        Assertions.assertTrue(Stream.of(buckets).anyMatch(key -> 
key.equals("mycamel-delete")));
+        Assertions.assertTrue(Stream.of(buckets).anyMatch(key -> 
key.equals(bucket)));
 
         RestAssured.delete("/aws2/s3/bucket/" + bucket)
                 .then()
                 .statusCode(204);
 
         buckets = getAllBuckets();
-        Assertions.assertTrue(Stream.of(buckets).noneMatch(key -> 
key.equals("mycamel-delete")));
+        Assertions.assertTrue(Stream.of(buckets).noneMatch(key -> 
key.equals(bucket)));
     }
 
     @Test

Reply via email to