Allocate new container name using prefix

Before we used the previous container name, which kept appending and
hit S3 limits during integration tests like:

Caused by: java.lang.IllegalArgumentException: Object 'gaul-blobstore27-4348532805015069992-1155797412711190448-1465016400636204031' doesn't match S3 bucket virtual host naming convention. Reason: Can't be null or empty. Length must be 3 to 63 symbols.. For more info, please refer to http://docs.amazonwebservices.com/AmazonS3/latest/index.html?BucketRestrictions.html
This commit is contained in:
Andrew Gaul 2013-08-26 21:42:43 -07:00
parent 15d9abead0
commit 4ca531aa98
1 changed files with 1 additions and 1 deletions

View File

@ -499,7 +499,7 @@ public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest<BlobStoreCont
deleteContainerOrWarnIfUnable(view, container);
}
});
String newScratchContainer = container + new SecureRandom().nextLong();
String newScratchContainer = CONTAINER_PREFIX + new SecureRandom().nextLong();
System.err.printf("*** allocated new container %s...%n", container);
return newScratchContainer;
}