timuralp commented on this pull request.
> + @Test(groups = { "integration", "live" })
+ public void testMultipartUploadMultiplePartsKnownETag() throws Exception {
+ BlobStore blobStore = view.getBlobStore();
+ String container = getContainerName();
+ // Pre-computed ETag returned by AWS S3 for the MPU consisting of two
5MB parts filled with 'b'
+ String expectedETag = "\"84462a16f6a60478d50148808aa609c1-2\"";
+ int partSize = 5 * (int) Math.pow(2, 20);
+ try {
+ String name = "blob-name";
+ BlobBuilder blobBuilder = blobStore.blobBuilder(name);
+ Blob blob = blobBuilder.build();
+ MultipartUpload mpu = blobStore.initiateMultipartUpload(container,
blob.getMetadata(), new PutOptions());
+
+ byte[] content = new byte[partSize];
+ Arrays.fill(content, (byte) 'b');
+ Payload payload = Payloads.newByteArrayPayload(content);
Most likely -- the challenging part is that I'd need to pre-compute the ETag
for that output. I picked the easy content of "b"s so I can easily test what
AWS S3 returns and used it as a test value (otherwise, like the original patch
pointed out, we have a problem of the test itself being buggy in the same way).
--
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/1252#discussion_r230231453