Repository: jclouds Updated Branches: refs/heads/master a90245afe -> c20fcb8cd
Do not compare MPU ETag contents AWS S3 MPU ETag are hashes of the part ETag headers but some implementations, specifically S3Proxy with the filesystem provider, represent multi-part objects as a single object. Remove these checks since they add nothing. Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/c20fcb8c Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/c20fcb8c Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/c20fcb8c Branch: refs/heads/master Commit: c20fcb8cda96676352b35f2d3d0a2304f2d6068b Parents: a90245a Author: Andrew Gaul <[email protected]> Authored: Tue Jan 12 15:36:37 2016 -0800 Committer: Andrew Gaul <[email protected]> Committed: Tue Jan 12 15:36:37 2016 -0800 ---------------------------------------------------------------------- .../test/java/org/jclouds/s3/S3ClientLiveTest.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/c20fcb8c/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java ---------------------------------------------------------------------- diff --git a/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java b/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java index 6ff3839..a6ba2c7 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java @@ -531,19 +531,10 @@ public class S3ClientLiveTest extends BaseBlobStoreIntegrationTest { } assertThat(getApi().listMultipartParts(containerName, key, uploadId)).containsOnlyKeys(1); - String eTag = getApi().completeMultipartUpload(containerName, key, uploadId, ImmutableMap.of(1, eTagOf1)); - - assert !eTagOf1.equals(eTag); + getApi().completeMultipartUpload(containerName, key, uploadId, ImmutableMap.of(1, eTagOf1)); object = getApi().getObject(containerName, key); assertEquals(ByteStreams2.toByteArrayAndClose(object.getPayload().openStream()), buffer); - - // noticing amazon does not return content-md5 header or a parsable ETag after a multi-part - // upload is complete: - // https://forums.aws.amazon.com/thread.jspa?threadID=61344 - assertEquals(object.getPayload().getContentMetadata().getContentMD5(), null); - assertEquals(getApi().headObject(containerName, key).getContentMetadata().getContentMD5(), null); - } finally { if (object != null) object.getPayload().close(); @@ -566,8 +557,7 @@ public class S3ClientLiveTest extends BaseBlobStoreIntegrationTest { String eTagOf1 = getApi().uploadPartCopy(containerName, toObject, 1, uploadId, containerName, fromObject, 1, oneHundredOneConstitutions.size() - 1); - String eTag = getApi().completeMultipartUpload(containerName, toObject, uploadId, ImmutableMap.of(1, eTagOf1)); - assertThat(eTag).isNotEqualTo(eTagOf1); + getApi().completeMultipartUpload(containerName, toObject, uploadId, ImmutableMap.of(1, eTagOf1)); object = getApi().getObject(containerName, toObject); assertEquals(ByteStreams2.toByteArrayAndClose(object.getPayload().openStream()), oneHundredOneConstitutions.slice(1, oneHundredOneConstitutions.size() - 1).read());
