timuralp commented on this pull request.
@archupsg03 please try running the live tests. I encountered a few issues when
try to do that.
> + public void testReplaceManifest() throws Exception {
+ for (String regionId : regions) {
+ assertReplaceManifest(regionId, defaultContainerName, defaultName);
+ uploadLargeFile(regionId);
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ @Test
+ public void uploadLargeFile(String regionId) throws IOException,
InterruptedException {
+ int partNumber = 1;
+ int total_size = 0;
+ RegionScopedBlobStoreContext ctx =
RegionScopedBlobStoreContext.class.cast(view);
+ BlobStore blobStore = ctx.getBlobStore();
+ // configure the blobstore to use multipart uploading of the file
+ for (int i = partNumber; i <= 3; partNumber++) {
This looks like a bug. Wouldn't `i` be incremented? As is, I have a test that
never completes, but creates 1000s of parts.
> + public String apply(SwiftObject input) {
+ return containerName + "/" + input.getName();
+ }
+ });
+
+ for (String name : pathsToDelete)
+ getApi().getObjectApi(regionId, containerName).delete(name);
+
+ }
+
+ @Override
+ @BeforeClass(groups = "live")
+ public void setup() {
+ super.setup();
+ for (String regionId : regions) {
+ boolean created =
getApi().getContainerApi(regionId).create(defaultContainerName);
You shouldn't have to do this. The jclouds tests provide containers. Check out
this method and the S3 provider on how to use them:
`blobstore/src/test/java/[...]/integration/internal/BaseBlobStoreIntegrationTest.java:434`.
This a copy/paste from the SLO test, but we shouldn't use the same pattern.
> + RegionScopedBlobStoreContext ctx =
> RegionScopedBlobStoreContext.class.cast(view);
+ BlobStore blobStore = ctx.getBlobStore();
+ // configure the blobstore to use multipart uploading of the file
+ for (int i = partNumber; i <= 3; partNumber++) {
+ String objName = String.format("%s/%s/%s", objectName, "dlo",
partNumber);
+ String data = String.format("%s%s", "data", partNumber);
+ ByteSource payload = ByteSource.wrap(data.getBytes(Charsets.UTF_8));
+ Blob blob = blobStore.blobBuilder(objName)
+ .payload(payload)
+ .build();
+ String etag = blobStore.putBlob(defaultContainerName, blob);
+ assertNotNull(etag);
+ total_size += data.length();
+ }
+
+ SwiftObject bigObject = getApi().getObjectApi(regionId,
defaultContainerName).get(objectName);
After fixing the above bug, I get a null pointer exception here.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1105#pullrequestreview-47052241