From 28bf8503dbb8d82bbeec72e6f79b83af059c310e Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 10 Apr 2015 23:11:21 -0700 Subject: [PATCH] Fix testCopyIfModifiedSince for AWS S3 --- apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java | 4 ++++ 1 file changed, 4 insertions(+) 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 0d0b4cf26a..ae535350f6 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/S3ClientLiveTest.java @@ -40,6 +40,7 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; +import java.util.concurrent.TimeUnit; import org.jclouds.blobstore.KeyNotFoundException; import org.jclouds.blobstore.domain.Blob; @@ -388,6 +389,9 @@ public class S3ClientLiveTest extends BaseBlobStoreIntegrationTest { ifSourceModifiedSince(before)); validateContent(destinationContainer, destinationKey); + // Sleep since Amazon returns 200 if the date is in the future: + // https://forums.aws.amazon.com/message.jspa?messageID=325930 + TimeUnit.SECONDS.sleep(20); try { getApi().copyObject(containerName, sourceKey + "mod", destinationContainer, destinationKey, ifSourceModifiedSince(after));