mirror of https://github.com/apache/jclouds.git
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:
parent
15d9abead0
commit
4ca531aa98
|
@ -499,7 +499,7 @@ public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest<BlobStoreCont
|
||||||
deleteContainerOrWarnIfUnable(view, container);
|
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);
|
System.err.printf("*** allocated new container %s...%n", container);
|
||||||
return newScratchContainer;
|
return newScratchContainer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue