From ce8315f31fe462c48a4cba230837cb103bcf9e46 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 12 Apr 2012 15:52:18 -0400 Subject: [PATCH] Replaced the deprecated BlobStoreContextFactory with the new-style BlobStoreContextBuilder for gae-tweetstore --- .../tweetstore/config/GuiceServletConfig.java | 14 ++++---- .../controller/AddTweetsController.java | 4 +-- .../controller/EnqueueStoresController.java | 2 +- .../controller/StoreTweetsController.java | 6 ++-- .../ServiceToStoredTweetStatuses.java | 6 ++-- .../controller/AddTweetsControllerTest.java | 12 ++++--- .../EnqueueStoresControllerTest.java | 20 ++++++------ .../controller/StoreTweetsControllerTest.java | 32 ++++++++++--------- .../functions/KeyToStoredTweetStatusTest.java | 6 ++-- .../ServiceToStoredTweetStatusesTest.java | 13 ++++---- .../integration/TweetStoreLiveTest.java | 16 +++++----- 11 files changed, 69 insertions(+), 62 deletions(-) diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java index c8a8ed000e..7f9364c47e 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java @@ -39,7 +39,7 @@ import java.util.Set; import javax.servlet.ServletContextEvent; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; import org.jclouds.demo.tweetstore.config.util.CredentialsCollector; import org.jclouds.demo.tweetstore.controller.AddTweetsController; import org.jclouds.demo.tweetstore.controller.EnqueueStoresController; @@ -73,16 +73,13 @@ import com.google.inject.servlet.ServletModule; public class GuiceServletConfig extends GuiceServletContextListener { public static final String PROPERTY_BLOBSTORE_CONTEXTS = "blobstore.contexts"; - private Map providerTypeToBlobStoreMap; + private Map> providerTypeToBlobStoreMap; private Twitter twitterClient; private String container; private Queue queue; @Override public void contextInitialized(ServletContextEvent servletContextEvent) { - - BlobStoreContextFactory blobStoreContextFactory = new BlobStoreContextFactory(); - Properties props = loadJCloudsProperties(servletContextEvent); Module googleModule = new GoogleAppEngineConfigurationModule(); @@ -105,7 +102,8 @@ public class GuiceServletConfig extends GuiceServletContextListener { // instantiate and store references to all blobstores by provider name providerTypeToBlobStoreMap = Maps.newHashMap(); for (String hint : getBlobstoreContexts(props)) { - providerTypeToBlobStoreMap.put(hint, blobStoreContextFactory.createContext(hint, modules, props)); + providerTypeToBlobStoreMap.put(hint, BlobStoreContextBuilder + .newBuilder(hint).modules(modules).overrides(props).build()); } // get a queue for submitting store tweet requests @@ -142,7 +140,7 @@ public class GuiceServletConfig extends GuiceServletContextListener { return Guice.createInjector(new ServletModule() { @Override protected void configureServlets() { - bind(new TypeLiteral>() { + bind(new TypeLiteral>>() { }).toInstance(providerTypeToBlobStoreMap); bind(Twitter.class).toInstance(twitterClient); bind(Queue.class).toInstance(queue); @@ -156,7 +154,7 @@ public class GuiceServletConfig extends GuiceServletContextListener { @Override public void contextDestroyed(ServletContextEvent servletContextEvent) { - for (BlobStoreContext context : providerTypeToBlobStoreMap.values()) { + for (BlobStoreContext context : providerTypeToBlobStoreMap.values()) { context.close(); } queue.purge(); diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/AddTweetsController.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/AddTweetsController.java index b681cfb27d..299448a481 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/AddTweetsController.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/AddTweetsController.java @@ -54,14 +54,14 @@ public class AddTweetsController extends HttpServlet implements /** The serialVersionUID */ private static final long serialVersionUID = 3888348023150822683L; - private final Map contexts; + private final Map> contexts; private final ServiceToStoredTweetStatuses blobStoreContextToContainerResult; @Resource protected Logger logger = Logger.NULL; @Inject - AddTweetsController(Map contexts, + AddTweetsController(Map> contexts, ServiceToStoredTweetStatuses blobStoreContextToContainerResult) { this.contexts = contexts; this.blobStoreContextToContainerResult = blobStoreContextToContainerResult; diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresController.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresController.java index 94568e4dec..150dff0f6c 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresController.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresController.java @@ -60,7 +60,7 @@ public class EnqueueStoresController extends HttpServlet { protected Logger logger = Logger.NULL; @Inject - public EnqueueStoresController(Map contexts, + public EnqueueStoresController(Map> contexts, Queue taskQueue) { contextNames = contexts.keySet(); this.taskQueue = taskQueue; diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/StoreTweetsController.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/StoreTweetsController.java index ae00c69d20..95453e0894 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/StoreTweetsController.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/controller/StoreTweetsController.java @@ -73,7 +73,7 @@ public class StoreTweetsController extends HttpServlet { /** The serialVersionUID */ private static final long serialVersionUID = 7215420527854203714L; - private final Map contexts; + private final Map> contexts; private final Twitter client; private final String container; @@ -82,7 +82,7 @@ public class StoreTweetsController extends HttpServlet { @Inject @VisibleForTesting - public StoreTweetsController(Map contexts, + public StoreTweetsController(Map> contexts, @Named(TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER) String container, Twitter client) { this.container = container; this.contexts = contexts; @@ -91,7 +91,7 @@ public class StoreTweetsController extends HttpServlet { @VisibleForTesting public void addMyTweets(String contextName, Iterable responseList) { - BlobStoreContext context = checkNotNull(contexts.get(contextName), "no context for " + contextName + " in " + BlobStoreContext context = checkNotNull(contexts.get(contextName), "no context for " + contextName + " in " + contexts.keySet()); BlobMap map = context.createBlobMap(container); for (Status status : responseList) { diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatuses.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatuses.java index 0807c7bb46..36437544d4 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatuses.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatuses.java @@ -39,11 +39,11 @@ import com.google.common.collect.Iterables; @Singleton public class ServiceToStoredTweetStatuses implements Function> { - private final Map contexts; + private final Map> contexts; private final String container; @Inject - public ServiceToStoredTweetStatuses(Map contexts, + public ServiceToStoredTweetStatuses(Map> contexts, @Named(TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER) String container) { this.contexts = contexts; this.container = container; @@ -53,7 +53,7 @@ public class ServiceToStoredTweetStatuses implements Function apply(String service) { - BlobStoreContext context = contexts.get(service); + BlobStoreContext context = contexts.get(service); String host = context.getProviderSpecificContext().getEndpoint().getHost(); try { BlobMap blobMap = context.createBlobMap(container); diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/AddTweetsControllerTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/AddTweetsControllerTest.java index f8328fa44e..d6989d8bbe 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/AddTweetsControllerTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/AddTweetsControllerTest.java @@ -26,7 +26,8 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; +import org.jclouds.blobstore.TransientApiMetadata; import org.jclouds.blobstore.domain.Blob; import org.jclouds.demo.tweetstore.domain.StoredTweetStatus; import org.jclouds.demo.tweetstore.functions.ServiceToStoredTweetStatuses; @@ -45,11 +46,12 @@ import com.google.common.collect.ImmutableSet; @Test(groups = "unit") public class AddTweetsControllerTest { - Map createServices(String container) throws InterruptedException, + Map> createServices(String container) throws InterruptedException, ExecutionException { - Map services = Maps.newHashMap(); + Map> services = Maps.newHashMap(); + TransientApiMetadata transientApiMetadata = TransientApiMetadata.builder().build(); for (String name : new String[] { "1", "2" }) { - BlobStoreContext context = new BlobStoreContextFactory().createContext("transient", "dummy", "dummy"); + BlobStoreContext context = BlobStoreContextBuilder.newBuilder(transientApiMetadata).build(); context.getAsyncBlobStore().createContainerInLocation(null, container).get(); Blob blob = context.getAsyncBlobStore().blobBuilder("1").build(); blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank"); @@ -62,7 +64,7 @@ public class AddTweetsControllerTest { public void testStoreTweets() throws IOException, InterruptedException, ExecutionException { String container = "container"; - Map contexts = createServices(container); + Map> contexts = createServices(container); ServiceToStoredTweetStatuses function = new ServiceToStoredTweetStatuses(contexts, container); AddTweetsController controller = new AddTweetsController(contexts, function); diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresControllerTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresControllerTest.java index dc0ac7bdf8..435285b62c 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresControllerTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/EnqueueStoresControllerTest.java @@ -19,15 +19,16 @@ package org.jclouds.demo.tweetstore.controller; import static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl; +import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; -import static org.easymock.classextension.EasyMock.createMock; -import static org.easymock.classextension.EasyMock.replay; -import static org.easymock.classextension.EasyMock.verify; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; import java.util.Map; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; +import org.jclouds.blobstore.TransientApiMetadata; import org.testng.annotations.Test; import com.google.appengine.api.taskqueue.Queue; @@ -42,15 +43,16 @@ import com.google.common.collect.ImmutableMap; @Test(groups = "unit") public class EnqueueStoresControllerTest { - Map createBlobStores() { - Map contexts = ImmutableMap.of( - "test1", new BlobStoreContextFactory().createContext("transient", "dummy", "dummy"), - "test2", new BlobStoreContextFactory().createContext("transient", "dummy", "dummy")); + Map> createBlobStores() { + TransientApiMetadata transientApiMetadata = TransientApiMetadata.builder().build(); + Map> contexts = ImmutableMap.>of( + "test1", BlobStoreContextBuilder.newBuilder(transientApiMetadata).build(), + "test2", BlobStoreContextBuilder.newBuilder(transientApiMetadata).build()); return contexts; } public void testEnqueueStores() { - Map stores = createBlobStores(); + Map> stores = createBlobStores(); Queue taskQueue = createMock(Queue.class); EnqueueStoresController function = new EnqueueStoresController(stores, taskQueue); diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/StoreTweetsControllerTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/StoreTweetsControllerTest.java index 0e82a13f25..cb89719fd5 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/StoreTweetsControllerTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/controller/StoreTweetsControllerTest.java @@ -18,10 +18,10 @@ */ package org.jclouds.demo.tweetstore.controller; +import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; -import static org.easymock.classextension.EasyMock.createMock; -import static org.easymock.classextension.EasyMock.replay; -import static org.easymock.classextension.EasyMock.verify; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; import static org.jclouds.util.Strings2.toStringAndClose; import static org.testng.Assert.assertEquals; @@ -32,7 +32,8 @@ import java.util.concurrent.ExecutionException; import org.jclouds.blobstore.BlobMap; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; +import org.jclouds.blobstore.TransientApiMetadata; import org.jclouds.blobstore.domain.Blob; import org.jclouds.demo.tweetstore.reference.TweetStoreConstants; import org.testng.annotations.Test; @@ -56,18 +57,19 @@ public class StoreTweetsControllerTest { return createMock(Twitter.class); } - Map createBlobStores() throws InterruptedException, ExecutionException { - Map contexts = ImmutableMap. of("test1", - new BlobStoreContextFactory().createContext("transient", "dummy", "dummy"), "test2", - new BlobStoreContextFactory().createContext("transient", "dummy", "dummy")); - for (BlobStoreContext blobstore : contexts.values()) { - blobstore.getAsyncBlobStore().createContainerInLocation(null, "favo").get(); - } - return contexts; + Map> createBlobStores() throws InterruptedException, ExecutionException { + TransientApiMetadata transientApiMetadata = TransientApiMetadata.builder().build(); + Map> contexts = ImmutableMap.>of( + "test1", BlobStoreContextBuilder.newBuilder(transientApiMetadata).build(), + "test2", BlobStoreContextBuilder.newBuilder(transientApiMetadata).build()); + for (BlobStoreContext blobstore : contexts.values()) { + blobstore.getAsyncBlobStore().createContainerInLocation(null, "favo").get(); + } + return contexts; } - + public void testStoreTweets() throws IOException, InterruptedException, ExecutionException { - Map stores = createBlobStores(); + Map> stores = createBlobStores(); StoreTweetsController function = new StoreTweetsController(stores, "favo", createTwitter()); User frank = createMock(User.class); @@ -99,7 +101,7 @@ public class StoreTweetsControllerTest { verify(jimmy); verify(jimmyStatus); - for (Entry entry : stores.entrySet()) { + for (Entry> entry : stores.entrySet()) { BlobMap map = entry.getValue().createBlobMap("favo"); Blob frankBlob = map.get("1"); assertEquals(frankBlob.getMetadata().getName(), "1"); diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/KeyToStoredTweetStatusTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/KeyToStoredTweetStatusTest.java index c662dd8a74..4c05f7ac68 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/KeyToStoredTweetStatusTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/KeyToStoredTweetStatusTest.java @@ -25,7 +25,8 @@ import java.util.concurrent.ExecutionException; import org.jclouds.blobstore.BlobMap; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; +import org.jclouds.blobstore.TransientApiMetadata; import org.jclouds.blobstore.domain.Blob; import org.jclouds.demo.tweetstore.domain.StoredTweetStatus; import org.jclouds.demo.tweetstore.reference.TweetStoreConstants; @@ -40,7 +41,8 @@ import org.testng.annotations.Test; public class KeyToStoredTweetStatusTest { BlobMap createMap() throws InterruptedException, ExecutionException { - BlobStoreContext context = new BlobStoreContextFactory().createContext("transient", "dummy", "dummy"); + BlobStoreContext context = + BlobStoreContextBuilder.newBuilder(TransientApiMetadata.builder().build()).build(); context.getBlobStore().createContainerInLocation(null, "test1"); return context.createBlobMap("test1"); } diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatusesTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatusesTest.java index 51df008762..54deb948db 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatusesTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/functions/ServiceToStoredTweetStatusesTest.java @@ -25,7 +25,8 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; +import org.jclouds.blobstore.TransientApiMetadata; import org.jclouds.blobstore.domain.Blob; import org.jclouds.demo.tweetstore.domain.StoredTweetStatus; import org.jclouds.demo.tweetstore.reference.TweetStoreConstants; @@ -42,12 +43,12 @@ import com.google.common.collect.Iterables; @Test(groups = "unit") public class ServiceToStoredTweetStatusesTest { - Map createServices(String container) throws InterruptedException, + Map> createServices(String container) throws InterruptedException, ExecutionException { - Map services = Maps.newHashMap(); + Map> services = Maps.newHashMap(); + TransientApiMetadata transientApiMetadata = TransientApiMetadata.builder().build(); for (String name : new String[] { "1", "2" }) { - BlobStoreContext context = new BlobStoreContextFactory().createContext("transient", - "dummy", "dummy"); + BlobStoreContext context = BlobStoreContextBuilder.newBuilder(transientApiMetadata).build(); context.getAsyncBlobStore().createContainerInLocation(null, container).get(); Blob blob = context.getAsyncBlobStore().blobBuilder("1").build(); blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank"); @@ -60,7 +61,7 @@ public class ServiceToStoredTweetStatusesTest { public void testStoreTweets() throws IOException, InterruptedException, ExecutionException { String container = "container"; - Map contexts = createServices(container); + Map> contexts = createServices(container); ServiceToStoredTweetStatuses function = new ServiceToStoredTweetStatuses(contexts, container); diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index 0bf21ce2ec..15073996ec 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -38,7 +38,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.jclouds.blobstore.BlobStoreContext; -import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.BlobStoreContextBuilder; import org.jclouds.demo.tweetstore.config.GuiceServletConfig; import org.jclouds.demo.tweetstore.controller.StoreTweetsController; import org.jclouds.logging.log4j.config.Log4JLoggingModule; @@ -73,7 +73,7 @@ import com.google.inject.Module; public class TweetStoreLiveTest { GoogleDevServer server; private URL url; - private Map contexts; + private Map> contexts; private String container; private static final Iterable blobstores = Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, @@ -94,13 +94,13 @@ public class TweetStoreLiveTest { // example of an ad-hoc client configuration addConfigurationForTwitter(props); - final BlobStoreContextFactory factory = new BlobStoreContextFactory(); // for testing, capture logs. final Set wiring = ImmutableSet. of(new Log4JLoggingModule()); this.contexts = Maps.newConcurrentMap(); for (String provider : blobstores) { - contexts.put(provider, factory.createContext(provider, wiring, props)); + contexts.put(provider, BlobStoreContextBuilder.newBuilder(provider) + .modules(wiring).overrides(props).build()); } Configuration conf = new ConfigurationBuilder() @@ -115,7 +115,7 @@ public class TweetStoreLiveTest { ResponseList statuses = client.getMentions(); boolean deleted = false; - for (BlobStoreContext context : contexts.values()) { + for (BlobStoreContext context : contexts.values()) { try { if (context.getBlobStore().containerExists(container)) { System.err.printf("deleting container %s at %s%n", container, context.getProviderSpecificContext() @@ -131,7 +131,7 @@ public class TweetStoreLiveTest { System.err.println("sleeping 60 seconds to allow containers to clear"); Thread.sleep(60000); } - for (BlobStoreContext context : contexts.values()) { + for (BlobStoreContext context : contexts.values()) { System.err.printf("creating container %s at %s%n", container, context.getProviderSpecificContext() .getEndpoint()); context.getBlobStore().createContainerInLocation(null, container); @@ -142,7 +142,7 @@ public class TweetStoreLiveTest { Thread.sleep(5000); } - for (Entry entry : contexts.entrySet()) { + for (Entry> entry : contexts.entrySet()) { System.err.printf("filling container %s at %s%n", container, entry.getKey()); controller.addMyTweets(entry.getKey(), statuses); } @@ -210,7 +210,7 @@ public class TweetStoreLiveTest { System.err.println("sleeping 20 seconds to allow for eventual consistency delay"); Thread.sleep(20000); - for (BlobStoreContext context : contexts.values()) { + for (BlobStoreContext context : contexts.values()) { assert context.createInputStreamMap(container).size() > 0 : context.getProviderSpecificContext().getEndpoint(); } }