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/08/06 06:38:29 UTC

[1/2] git commit: Revert "A 401 error should result in re-authenticating for a new token"

Updated Branches:
  refs/heads/1.6.x 78e5832fd -> faecd45a0


Revert "A 401 error should result in re-authenticating for a new token"

This reverts commit 7b0cd9be43a6035a71652bb5c9f3cd604e18eb9d.

References JCLOUDS-231


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

Branch: refs/heads/1.6.x
Commit: c0a438b6718b5ec8a827e1cad2f13a5c0f4d7345
Parents: 78e5832
Author: Andrew Gaul <ga...@apache.org>
Authored: Mon Aug 5 21:37:51 2013 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Mon Aug 5 21:37:51 2013 -0700

----------------------------------------------------------------------
 .../jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java   | 4 ++--
 .../openstack/keystone/v2_0/handlers/RetryOnRenewTest.java       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c0a438b6/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
----------------------------------------------------------------------
diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
index 835e65e..d358484 100644
--- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
+++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
@@ -64,8 +64,8 @@ public class RetryOnRenew implements HttpRetryHandler {
                   retry = false;
                } else {
                   byte[] content = closeClientButKeepContentStream(response);
-                  // Error when the session token expires: HTTP/1.1 401 Unauthorized, no body (or provider-specific response body)
-                  if (content != null) {
+                  //TODO: what is the error when the session token expires??
+                  if (content != null && new String(content).contains("lease renew")) {
                      logger.debug("invalidating authentication token");
                      authenticationResponseCache.invalidateAll();
                      retry = true;

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c0a438b6/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
----------------------------------------------------------------------
diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
index 87beb37..f152701 100644
--- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
+++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
@@ -53,7 +53,7 @@ public class RetryOnRenewTest {
       cache.invalidateAll();
       expectLastCall();
 
-      expect(response.getPayload()).andReturn(Payloads.newStringPayload("")).anyTimes();
+      expect(response.getPayload()).andReturn(Payloads.newStringPayload("token expired, please renew")).anyTimes();
       expect(response.getStatusCode()).andReturn(401).atLeastOnce();
 
       replay(command);


[2/2] git commit: Enable time-bound signed URL tests for HPCS.

Posted by ga...@apache.org.
Enable time-bound signed URL tests for HPCS.

HP does, in fact, support configurable temporary signed URLs:
http://docs.hpcloud.com/api/object-storage#temp_url

References JCLOUDS-231


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

Branch: refs/heads/1.6.x
Commit: faecd45a019dd002b9a312e294dd716a0fb2f5d1
Parents: c0a438b
Author: Diwaker Gupta <di...@maginatics.com>
Authored: Mon Aug 5 14:04:13 2013 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Mon Aug 5 21:38:06 2013 -0700

----------------------------------------------------------------------
 .../HPCloudObjectStorageBlobSignerLiveTest.java    | 17 -----------------
 1 file changed, 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/faecd45a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
index 2bb01f6..06b7e2d 100644
--- a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
+++ b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
@@ -30,21 +30,4 @@ public class HPCloudObjectStorageBlobSignerLiveTest extends SwiftBlobSignerLiveT
    public HPCloudObjectStorageBlobSignerLiveTest() {
       provider = "hpcloud-objectstorage";
    }
-
-   // hp doesn't yet support time-bound request signing
-   // https://api-docs.hpcloud.com/hpcloud-object-storage/1.0/content/ch_object-storage-dev-overview.html
-   @Override
-   @Test(expectedExceptions = AuthorizationException.class)
-   public void testSignGetUrlWithTime() throws InterruptedException, IOException {
-      super.testSignGetUrlWithTime();
-   }
-
-   // hp doesn't yet support time-bound request signing
-   // https://api-docs.hpcloud.com/hpcloud-object-storage/1.0/content/ch_object-storage-dev-overview.html
-   @Override
-   @Test(expectedExceptions = AuthorizationException.class)
-   public void testSignPutUrlWithTime() throws Exception {
-      super.testSignPutUrlWithTime();
-   }
-
 }