mirror of https://github.com/apache/jclouds.git
s3 from ec2 seems to be more sensitive. Allow bucket empty to try twice instead of failing
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1478 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
d5f6cc6f21
commit
dd1863f7ff
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue