mirror of https://github.com/apache/jclouds.git
fixed tests
This commit is contained in:
parent
a9971cc050
commit
bdc19483d7
|
@ -20,8 +20,8 @@ package org.jclouds.blobstore.strategy.internal;
|
|||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.ContextBuilder;
|
||||
import org.jclouds.blobstore.BlobStore;
|
||||
import org.jclouds.blobstore.BlobStoreContextFactory;
|
||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||
import org.jclouds.blobstore.options.ListContainerOptions;
|
||||
import org.testng.annotations.AfterClass;
|
||||
|
@ -29,7 +29,6 @@ import org.testng.annotations.BeforeClass;
|
|||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
|
@ -43,7 +42,7 @@ public class ConcatenateContainerListsTest {
|
|||
|
||||
@BeforeClass
|
||||
void setupBlobStore() {
|
||||
Injector injector = ContextBuilder.newBuilder("transient").buildInjector();
|
||||
Injector injector = new BlobStoreContextFactory().createContext("transient", "foo", "bar").utils().injector();
|
||||
blobstore = injector.getInstance(BlobStore.class);
|
||||
concatter = injector.getInstance(ConcatenateContainerLists.class);
|
||||
}
|
||||
|
@ -77,6 +76,6 @@ public class ConcatenateContainerListsTest {
|
|||
@AfterClass
|
||||
void close() {
|
||||
if (blobstore != null)
|
||||
Closeables.closeQuietly(blobstore.getContext());
|
||||
blobstore.getContext().close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,14 +20,13 @@ package org.jclouds.blobstore.strategy.internal;
|
|||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.ContextBuilder;
|
||||
import org.jclouds.blobstore.BlobStore;
|
||||
import org.jclouds.blobstore.BlobStoreContextFactory;
|
||||
import org.jclouds.blobstore.options.ListContainerOptions;
|
||||
import org.testng.annotations.AfterMethod;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
|
@ -43,7 +42,7 @@ public class DeleteAllKeysInListTest {
|
|||
|
||||
@BeforeMethod
|
||||
void setupBlobStore() {
|
||||
Injector injector = ContextBuilder.newBuilder("transient").buildInjector();
|
||||
Injector injector = new BlobStoreContextFactory().createContext("transient", "foo", "bar").utils().injector();
|
||||
blobstore = injector.getInstance(BlobStore.class);
|
||||
deleter = injector.getInstance(DeleteAllKeysInList.class);
|
||||
createDataSet();
|
||||
|
@ -51,7 +50,8 @@ public class DeleteAllKeysInListTest {
|
|||
|
||||
@AfterMethod
|
||||
void close() {
|
||||
Closeables.closeQuietly(blobstore.getContext());
|
||||
if (blobstore != null)
|
||||
blobstore.getContext().close();
|
||||
}
|
||||
|
||||
public void testExecuteWithoutOptionsClearsRecursively() {
|
||||
|
|
Loading…
Reference in New Issue