From a22a72529332a2d8620c21c0aaa7ae39a435b2fb Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 5 Oct 2014 11:41:36 -0700 Subject: [PATCH] JCLOUDS-40 Remove AsyncBlobStore references from filesystem api --- .../internal/FileSystemBlobUtilsImpl.java | 2 +- ...Test.java => FilesystemBlobStoreTest.java} | 46 +------------------ .../src/test/resources/logging.properties | 2 - 3 files changed, 3 insertions(+), 47 deletions(-) rename apis/filesystem/src/test/java/org/jclouds/filesystem/{FilesystemAsyncBlobStoreTest.java => FilesystemBlobStoreTest.java} (96%) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/util/internal/FileSystemBlobUtilsImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/util/internal/FileSystemBlobUtilsImpl.java index 3dfcd31ae7..2dbd2ad92e 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/util/internal/FileSystemBlobUtilsImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/util/internal/FileSystemBlobUtilsImpl.java @@ -30,7 +30,7 @@ import com.google.inject.Inject; /** * Implements the {@link BlobUtils} interfaced and act as a bridge to - * {@link LocalStorageStrategy} when used inside {@link AsyncBlobStore} + * {@link LocalStorageStrategy} when used inside {@link BlobStore} */ public class FileSystemBlobUtilsImpl implements BlobUtils { diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemAsyncBlobStoreTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java similarity index 96% rename from apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemAsyncBlobStoreTest.java rename to apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java index 31292414a8..ad2bc92ec5 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemAsyncBlobStoreTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java @@ -64,11 +64,8 @@ import com.google.common.io.ByteSource; import com.google.common.io.Files; import com.google.inject.CreationException; -/** - * Test class for {@link FilesystemAsyncBlobStore} class - */ -@Test(groups = "unit", testName = "filesystem.FilesystemAsyncBlobStoreTest", singleThreaded = true) -public class FilesystemAsyncBlobStoreTest { +@Test(groups = "unit", testName = "FilesystemBlobStoreTest", singleThreaded = true) +public class FilesystemBlobStoreTest { private static final String CONTAINER_NAME = "fun-blobstore-test"; private static final String TARGET_CONTAINER_NAME = TestUtils.TARGET_BASE_DIR + CONTAINER_NAME; @@ -162,9 +159,6 @@ public class FilesystemAsyncBlobStoreTest { assertTrue(containersRetrieved.isEmpty(), "List operation returns a not empty set of container"); } - /** - * Test of list method, of class FilesystemAsyncBlobStore. - */ public void testList_NoOptionSingleContainer() throws IOException { blobStore.createContainerInLocation(null, CONTAINER_NAME); // Testing list for an empty container @@ -188,9 +182,6 @@ public class FilesystemAsyncBlobStoreTest { } } - /** - * Test of list method, of class FilesystemAsyncBlobStore. - */ public void testList_NoOptionDoubleContainer() throws IOException { final String CONTAINER_NAME2 = "container2"; @@ -248,10 +239,6 @@ public class FilesystemAsyncBlobStoreTest { blobStore.clearContainer(CONTAINER_NAME); } - /** - * Integration test, because clearContainer is not redefined in - * {@link FilesystemAsyncBlobStore} class - */ public void testClearContainer_NoOptions() throws IOException { final String CONTAINER_NAME2 = "containerToClear"; @@ -285,27 +272,15 @@ public class FilesystemAsyncBlobStoreTest { checkForContainerContent(CONTAINER_NAME2, null); } - /** - * Integration test, because countBlobs is not redefined in - * {@link FilesystemAsyncBlobStore} class - */ public void testCountBlobs_NotExistingContainer() { blobStore.countBlobs(PROVIDER); } - /** - * Integration test, because countBlobs is not redefined in - * {@link FilesystemAsyncBlobStore} class - */ public void testCountBlobs_NoOptionsEmptyContainer() { blobStore.createContainerInLocation(null, CONTAINER_NAME); blobStore.countBlobs(PROVIDER); } - /** - * Integration test, because countBlobs is not redefined in - * {@link FilesystemAsyncBlobStore} class - */ public void testCountBlobs_NoOptions() { blobStore.createContainerInLocation(null, CONTAINER_NAME); blobStore.countBlobs(PROVIDER); @@ -442,9 +417,6 @@ public class FilesystemAsyncBlobStoreTest { TestUtils.directoryExists(TARGET_CONTAINER_NAME + "/aa", false); } - /** - * Test of containerExists method, of class FilesystemAsyncBlobStore. - */ public void testContainerExists() throws IOException { boolean result; @@ -458,10 +430,6 @@ public class FilesystemAsyncBlobStoreTest { assertTrue(result, "Container doesn't exist"); } - /** - * Test of createContainerInLocation method, of class - * FilesystemAsyncBlobStore. - */ public void testCreateContainerInLocation() throws IOException { final String CONTAINER_NAME2 = "funambol-test-2"; final String TARGET_CONTAINER_NAME2 = TestUtils.TARGET_BASE_DIR + CONTAINER_NAME2; @@ -485,10 +453,6 @@ public class FilesystemAsyncBlobStoreTest { TestUtils.directoryExists(TestUtils.TARGET_BASE_DIR + CONTAINER_NAME2, true); } - /** - * Test of putBlob method, of class FilesystemAsyncBlobStore. with a simple - * filename - no path in the filename, eg filename.jpg - */ public void testPutBlobSimpleName() { blobStore.createContainerInLocation(null, CONTAINER_NAME); putBlobAndCheckIt(TestUtils.createRandomBlobKey("putBlob-", ".jpg")); @@ -518,9 +482,6 @@ public class FilesystemAsyncBlobStoreTest { putBlobAndCheckIt(TestUtils.createRandomBlobKey("putBlob-", ".jpg")); } - /** - * Test of blobExists method, of class FilesystemAsyncBlobStore. - */ public void testBlobExists() throws IOException { boolean result; String blobKey; @@ -562,9 +523,6 @@ public class FilesystemAsyncBlobStoreTest { } } - /** - * Test of getBlob method, of class FilesystemAsyncBlobStore. - */ public void testGetBlob() throws IOException { String blobKey = TestUtils.createRandomBlobKey(); GetOptions options = null; diff --git a/apis/filesystem/src/test/resources/logging.properties b/apis/filesystem/src/test/resources/logging.properties index 2b769837c2..6f45f70df9 100644 --- a/apis/filesystem/src/test/resources/logging.properties +++ b/apis/filesystem/src/test/resources/logging.properties @@ -25,5 +25,3 @@ handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -org.jclouds.filesystem.FilesystemAsyncBlobStore.level=ALL -org.jclouds.filesystem.FilesystemAsyncBlobStore.handler=java.util.logging.ConsoleHandler