Repository: jclouds-labs-openstack
Updated Branches:
  refs/heads/master 978234238 -> 654dcb665


Replace uses of ByteStreams2.asByteSource


Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/commit/654dcb66
Tree: 
http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/tree/654dcb66
Diff: 
http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/diff/654dcb66

Branch: refs/heads/master
Commit: 654dcb665472e329edf12d64633a079834c3ebd0
Parents: 9782342
Author: Andrew Gaul <[email protected]>
Authored: Thu Sep 4 19:28:37 2014 -0700
Committer: Andrew Gaul <[email protected]>
Committed: Thu Sep 4 19:29:52 2014 -0700

----------------------------------------------------------------------
 .../blobstore/RegionScopedBlobStoreContextLiveTest.java  | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-labs-openstack/blob/654dcb66/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContextLiveTest.java
----------------------------------------------------------------------
diff --git 
a/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContextLiveTest.java
 
b/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContextLiveTest.java
index 57ce439..c616f2d 100644
--- 
a/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContextLiveTest.java
+++ 
b/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContextLiveTest.java
@@ -20,11 +20,9 @@ import static 
org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CRED
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.Properties;
 import java.util.Set;
 import java.util.UUID;
@@ -48,7 +46,6 @@ import org.testng.annotations.Test;
 
 import com.google.common.collect.Iterables;
 import com.google.common.io.ByteSource;
-import com.google.common.io.ByteStreams;
 import com.google.common.hash.Hashing;
 import com.google.common.net.MediaType;
 import com.google.common.net.HttpHeaders;
@@ -152,12 +149,8 @@ public class RegionScopedBlobStoreContextLiveTest extends 
BaseBlobStoreIntegrati
                      + response.getStatusCode());
             }
             Payload payload = response.getPayload();
-            if (!Arrays.equals(ByteStreams2.toByteArrayAndClose(
-                    payload.openStream()), input.read())) {
-               fail("Data with signed GET not identical to what was put: "
-                     + "Input: " + new String(input.read()) + ", Output :"
-                     + ByteStreams2.asByteSource(payload));
-            }
+            
assertEquals(ByteStreams2.toByteArrayAndClose(payload.openStream()), 
input.read(),
+                  "Data with signed GET not identical to what was put");
          } catch (Exception e) {
             fail("Failed signed GET test: " + e);
          }

Reply via email to