jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bram Pouwelse <b...@pouwelse.com>
Subject BlobStore#clearContainer never returns after closing BlobStoreContext
Date Fri, 10 Jun 2016 12:45:41 GMT
Hi,

I'm running into some never ending integration tests in my prohect after
upgrading jcouds to 1.9.2, this seems to be caused by calling
BlobStore#clearContainer after the BlobStoreContext has been closed. I've
attached a patch to demonstrate this issue using the
org.jclouds.blobstore.integration.TransientServiceIntegrationTest at the
end of this mail.

After figuring out the root cause of my problem I did some more tests and I
don't really get what the close method is supposed to do, If I try the same
using the filesystem provider there is no issue? How is it possible the
BlobStoreContext (and BlobStore instances created from that context) are
still usable after closing the context?

Regards,
Bram

Patch (tested on the 1.9.x branch):

diff --git
a/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientBlobIntegrationTest.java
b/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientBlobIntegrationTest.java
index eeaaf96..e63cef6 100644
---
a/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientBlobIntegrationTest.java
+++
b/blobstore/src/test/java/org/jclouds/blobstore/integration/TransientBlobIntegrationTest.java
@@ -16,6 +16,8 @@
  */
 package org.jclouds.blobstore.integration;

+import org.jclouds.blobstore.BlobStore;
+
 import org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest;
 import org.testng.annotations.Test;

@@ -24,4 +26,13 @@ public class TransientBlobIntegrationTest extends
BaseBlobIntegrationTest {
    public TransientBlobIntegrationTest() {
       provider = "transient";
    }
+
+   @Test(groups = { "integration"})
+   public void testClearContainerAfterCloseNeverEnds() throws Exception {
+        BlobStore blobStore = view.getBlobStore();
+        blobStore.createContainerInLocation(null, "test");
+        blobStore.putBlob("test",
blobStore.blobBuilder("dummy").payload("test".getBytes()).build());
+    view.close();
+        blobStore.clearContainer("test");
+   }
 }

Mime
View raw message