diff --git a/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java b/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java index 27e98c259e..1e0e3b4c57 100644 --- a/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java +++ b/aws/s3/core/src/test/java/org/jclouds/aws/s3/S3IntegrationTest.java @@ -223,7 +223,12 @@ public class S3IntegrationTest { public String getBucketName() throws InterruptedException, ExecutionException, TimeoutException { String bucketName = bucketNames.poll(30, TimeUnit.SECONDS); - emptyBucket(bucketName); + // retrying as inside EC2 it may take longer to reflect the contents of a bucket. + try { + emptyBucket(bucketName); + } catch (AssertionError e) { + emptyBucket(bucketName); + } assert bucketName != null : "unable to get a bucket for the test"; return bucketName; }