You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2013/10/17 22:08:17 UTC

git commit: Work around CloudFiles test failures

Updated Branches:
  refs/heads/master 578a77d63 -> e30f86521


Work around CloudFiles test failures

Java helpfully interprets Expect: 100-continue instead of returning
the response code.  This commit reverts
100afba1d8b2d1a440168fed271a7b39ab0152e7.


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/e30f8652
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/e30f8652
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/e30f8652

Branch: refs/heads/master
Commit: e30f8652158ee93f132275a720f0d150a5c4fc07
Parents: 578a77d
Author: Andrew Gaul <ga...@apache.org>
Authored: Mon Oct 14 17:19:29 2013 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Thu Oct 17 13:08:02 2013 -0700

----------------------------------------------------------------------
 .../integration/CloudFilesBlobSignerLiveTest.java    | 15 ---------------
 .../integration/internal/BaseBlobSignerLiveTest.java |  5 +++++
 .../integration/CloudFilesUKBlobSignerLiveTest.java  | 15 ---------------
 .../integration/CloudFilesUSBlobSignerLiveTest.java  | 15 ---------------
 4 files changed, 5 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/e30f8652/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobSignerLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobSignerLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobSignerLiveTest.java
index 264c864..ef74a4d 100644
--- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobSignerLiveTest.java
+++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobSignerLiveTest.java
@@ -16,10 +16,7 @@
  */
 package org.jclouds.cloudfiles.blobstore.integration;
 
-import java.io.IOException;
-
 import org.jclouds.openstack.swift.blobstore.integration.SwiftBlobSignerLiveTest;
-import org.testng.SkipException;
 import org.testng.annotations.Test;
 
 /**
@@ -30,16 +27,4 @@ public class CloudFilesBlobSignerLiveTest extends SwiftBlobSignerLiveTest {
    public CloudFilesBlobSignerLiveTest() {
       provider = "cloudfiles";
    }
-
-   @Override
-   @Test
-   public void testSignGetUrlWithTime() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
-   }
-
-   @Override
-   @Test
-   public void testSignPutUrlWithTime() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
-   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/e30f8652/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java
----------------------------------------------------------------------
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 e1461f7..879f8f9 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
@@ -16,6 +16,7 @@
  */
 package org.jclouds.blobstore.integration.internal;
 
+import static com.google.common.net.HttpHeaders.EXPECT;
 import static org.jclouds.blobstore.options.GetOptions.Builder.range;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
@@ -130,6 +131,10 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest {
       String container = getContainerName();
       try {
          HttpRequest request = view.getSigner().signPutBlob(container, blob, 3 /* seconds */);
+         // Strip Expect: 100-continue since Java 7+ will throw a
+         // ProtocolException instead of setting the response code:
+         // http://www.docjar.com/html/api/sun/net/www/protocol/http/HttpURLConnection.java.html#1021
+         request = request.toBuilder().removeHeader(EXPECT).build();
          assertEquals(request.getFilters().size(), 0);
 
          Strings2.toString(view.utils().http().invoke(request).getPayload());

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/e30f8652/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUKBlobSignerLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUKBlobSignerLiveTest.java b/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUKBlobSignerLiveTest.java
index 6d1adcc..5a7344d 100644
--- a/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUKBlobSignerLiveTest.java
+++ b/providers/cloudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUKBlobSignerLiveTest.java
@@ -16,10 +16,7 @@
  */
 package org.jclouds.rackspace.cloudfiles.blobstore.integration;
 
-import java.io.IOException;
-
 import org.jclouds.cloudfiles.blobstore.integration.CloudFilesBlobSignerLiveTest;
-import org.testng.SkipException;
 import org.testng.annotations.Test;
 
 /**
@@ -31,16 +28,4 @@ public class CloudFilesUKBlobSignerLiveTest extends CloudFilesBlobSignerLiveTest
    public CloudFilesUKBlobSignerLiveTest() {
       provider = "cloudfiles-uk";
    }
-
-   @Override
-   @Test
-   public void testSignGetUrlWithTime() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
-   }
-
-   @Override
-   @Test
-   public void testSignPutUrlWithTime() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
-   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/e30f8652/providers/cloudfiles-us/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUSBlobSignerLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/cloudfiles-us/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUSBlobSignerLiveTest.java b/providers/cloudfiles-us/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUSBlobSignerLiveTest.java
index 21b0d58..c320287 100644
--- a/providers/cloudfiles-us/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUSBlobSignerLiveTest.java
+++ b/providers/cloudfiles-us/src/test/java/org/jclouds/rackspace/cloudfiles/blobstore/integration/CloudFilesUSBlobSignerLiveTest.java
@@ -16,10 +16,7 @@
  */
 package org.jclouds.rackspace.cloudfiles.blobstore.integration;
 
-import java.io.IOException;
-
 import org.jclouds.cloudfiles.blobstore.integration.CloudFilesBlobSignerLiveTest;
-import org.testng.SkipException;
 import org.testng.annotations.Test;
 
 /**
@@ -31,16 +28,4 @@ public class CloudFilesUSBlobSignerLiveTest extends CloudFilesBlobSignerLiveTest
    public CloudFilesUSBlobSignerLiveTest() {
       provider = "cloudfiles-us";
    }
-
-   @Override
-   @Test
-   public void testSignGetUrlWithTime() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
-   }
-
-   @Override
-   @Test
-   public void testSignPutUrlWithTime() throws InterruptedException, IOException {
-      throw new SkipException("not yet implemented");
-   }
 }