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 2015/06/26 23:06:00 UTC
jclouds git commit: JCLOUDS-931: Sleep only after creating containers.
Repository: jclouds
Updated Branches:
refs/heads/master aa64e0d3e -> e63474a82
JCLOUDS-931: Sleep only after creating containers.
jclouds should issue the requests to create all of the containers in
the container pool before sleeping. The patch modifies the
createContainerAndEnsureEmpty() method to take an additional
parameter, which specifies whether awaitConsistency() should be called
or not.
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/e63474a8
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/e63474a8
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/e63474a8
Branch: refs/heads/master
Commit: e63474a8242aabab38785567d53467dd825d956f
Parents: aa64e0d
Author: Timur Alperovich <ti...@gmail.com>
Authored: Thu Jun 25 16:35:59 2015 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Fri Jun 26 14:04:43 2015 -0700
----------------------------------------------------------------------
.../internal/BaseBlobStoreIntegrationTest.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/e63474a8/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java
----------------------------------------------------------------------
diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java
index d173583..790cd4a 100644
--- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java
+++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java
@@ -156,7 +156,7 @@ public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest<BlobStoreCont
containerCount++;
} else {
try {
- createContainerAndEnsureEmpty(context, containerName);
+ createContainerAndEnsureEmpty(context, containerName, false);
if (context.getBlobStore().containerExists(containerName))
containerNames.put(containerName);
else {
@@ -172,6 +172,7 @@ public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest<BlobStoreCont
}
}
}
+ awaitConsistency();
testContext.setAttribute("containerNames", containerNames);
System.err.printf("*** containers to test: %s%n", containerNames);
// careful not to keep too many files open
@@ -252,15 +253,17 @@ public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest<BlobStoreCont
assertConsistencyAware(view, assertion);
}
- protected void createContainerAndEnsureEmpty(BlobStoreContext context, final String containerName)
- throws InterruptedException {
+ protected void createContainerAndEnsureEmpty(BlobStoreContext context, final String containerName,
+ boolean ensureConsistent) throws InterruptedException {
context.getBlobStore().createContainerInLocation(null, containerName);
- awaitConsistency();
+ if (ensureConsistent) {
+ awaitConsistency();
+ }
context.getBlobStore().clearContainer(containerName);
}
protected void createContainerAndEnsureEmpty(String containerName) throws InterruptedException {
- createContainerAndEnsureEmpty(view, containerName);
+ createContainerAndEnsureEmpty(view, containerName, true);
}
protected String addBlobToContainer(String sourceContainer, String key) {