changed behavior so that bad buckets aren't accidentally given out

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1476 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-06-27 20:27:51 +00:00
parent d41f1fac72
commit 9c84796aa3
1 changed files with 8 additions and 3 deletions

View File

@ -295,10 +295,15 @@ public class S3IntegrationTest {
this.deleteEverything(); this.deleteEverything();
for (; bucketIndex < bucketCount; bucketIndex++) { for (; bucketIndex < bucketCount; bucketIndex++) {
String bucketName = bucketPrefix + bucketIndex; String bucketName = bucketPrefix + bucketIndex;
bucketNames.put(bucketName); try {
createBucketAndEnsureEmpty(bucketName); createBucketAndEnsureEmpty(bucketName);
bucketNames.put(bucketName);
} catch (AssertionError e) {
// throw away the bucket and try again with the next index
deleteBucket(bucketName);
bucketCount++;
}
} }
Thread.sleep(INCONSISTENCY_WINDOW);
} }
} }
} }