From 1f35e959aabba37ded590cd7eb50e0e3604e8c4b Mon Sep 17 00:00:00 2001 From: Zack Shoylev Date: Fri, 6 Feb 2015 14:49:21 -0600 Subject: [PATCH] Makes the test testSignGetUrlWithTime more robust --- .../integration/internal/BaseBlobSignerLiveTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java index bed8c35f22..bf45401201 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java @@ -31,6 +31,8 @@ import org.jclouds.util.Strings2; import org.testng.SkipException; import org.testng.annotations.Test; +import com.google.common.util.concurrent.Uninterruptibles; + /** * Tests integrated functionality of all signature commands. *

@@ -79,7 +81,7 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { public void testSignGetUrlWithTime() throws InterruptedException, IOException { String name = "hello"; String text = "fooooooooooooooooooooooo"; - int timeout = 5; + int timeout = 10; Blob blob = view.getBlobStore().blobBuilder(name).payload(text).contentType("text/plain").build(); String container = getContainerName(); @@ -87,8 +89,9 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { view.getBlobStore().putBlob(container, blob); assertConsistencyAwareContainerSize(container, 1); HttpRequest request = view.getSigner().signGetBlob(container, name, timeout); - + assertEquals(request.getFilters().size(), 0); + Uninterruptibles.sleepUninterruptibly(timeout / 2, TimeUnit.SECONDS); assertEquals(Strings2.toStringAndClose(view.utils().http().invoke(request).getPayload().openStream()), text); TimeUnit.SECONDS.sleep(2 * timeout);