diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java index a6d560cf40..06f401dfb5 100755 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobMapIntegrationTest.java @@ -78,7 +78,7 @@ public class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest map = createMap(context, bucketName); - putString(map, "one", "two"); + putStringWithMD5(map, "one", "two"); assertConsistencyAwareContentEquals(map, "one", "two"); // TODO track how often this occurs and potentially update map implementation assertConsistencyAwareRemoveEquals(map, "one", null); @@ -135,9 +135,10 @@ public class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest map = createMap(context, bucketName); - putString(map, "one", "apple"); + putStringWithMD5(map, "one", "apple"); Blob object = newBlob("one"); object.setData("apple"); + object.generateMD5(); assertConsistencyAwareContainsValue(map, object); } finally { returnContainer(bucketName); @@ -200,9 +201,10 @@ public class BaseBlobMapIntegrationTest extends BaseMapIntegrationTest map, String key, String value) { + protected void putStringWithMD5(Map map, String key, String value) { Blob object = newBlob(key); object.setData(value); + object.generateMD5(); map.put(key, object); } diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java index 08dc50ade6..39d85a40ca 100755 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseInputStreamMapIntegrationTest.java @@ -78,7 +78,7 @@ public class BaseInputStreamMapIntegrationTest extends BaseMapIntegrationTest String bucketName = getContainerName(); try { Map map = createMap(context, bucketName); - putString(map, "one", "two"); + putStringWithMD5(map, "one", "two"); InputStream old = map.remove("one"); assertEquals(Utils.toStringAndClose(old), "two"); old = map.remove("one"); @@ -309,7 +309,7 @@ public class BaseInputStreamMapIntegrationTest extends BaseMapIntegrationTest } @Override - protected void putString(Map map, String key, String value) + protected void putStringWithMD5(Map map, String key, String value) throws InterruptedException, ExecutionException, TimeoutException { ((InputStreamMap) map).putString(key, value); } diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java index 4fe3fe1740..cb8b71fb3b 100755 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseMapIntegrationTest.java @@ -106,7 +106,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegrat try { Map map = createMap(context, bucketName); assertConsistencyAwareMapSize(map, 0); - putString(map, "one", "apple"); + putStringWithMD5(map, "one", "apple"); assertConsistencyAwareMapSize(map, 1); map.clear(); assertConsistencyAwareMapSize(map, 0); @@ -125,7 +125,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegrat try { Map map = createMap(context, bucketName); assertConsistencyAwareKeySize(map, 0); - putString(map, "one", "two"); + putStringWithMD5(map, "one", "two"); assertConsistencyAwareKeySize(map, 1); assertConsistencyAwareKeySetEquals(map, ImmutableSet.of("one")); } finally { @@ -175,7 +175,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegrat try { Map map = createMap(context, bucketName); assertConsistencyAwareDoesntContainKey(map); - putString(map, "one", "apple"); + putStringWithMD5(map, "one", "apple"); assertConsistencyAwareContainsKey(map); } finally { returnContainer(bucketName); @@ -219,7 +219,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegrat try { Map map = createMap(context, bucketName); assertConsistencyAwareEmpty(map); - putString(map, "one", "apple"); + putStringWithMD5(map, "one", "apple"); assertConsistencyAwareNotEmpty(map); } finally { returnContainer(bucketName); @@ -243,7 +243,7 @@ public abstract class BaseMapIntegrationTest extends BaseBlobStoreIntegrat }); } - abstract protected void putString(Map map, String key, String value) + abstract protected void putStringWithMD5(Map map, String key, String value) throws InterruptedException, ExecutionException, TimeoutException; protected void fourLeftRemovingOne(Map map) throws InterruptedException,