From 160cd273e271edbdd34d237cd279311a1201a2e2 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Fri, 1 Jun 2012 12:58:05 -0700 Subject: [PATCH] group name in test was too long, making dns exceptions --- .../internal/BaseComputeServiceLiveTest.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java index e24ff2cf35..3fc40b22f8 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java @@ -419,30 +419,31 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte @Test(enabled = true, dependsOnMethods = "testCompareSizes") public void testConcurrentUseOfComputeServiceToCreateNodes() throws Exception { - final long timeoutMs = 20*60*1000; + final long timeoutMs = 20 * 60 * 1000; List groups = new ArrayList(); List> futures = new ArrayList>(); ListeningExecutorService executor = MoreExecutors.listeningDecorator(context.utils().userExecutor()); - + try { for (int i = 0; i < 2; i++) { final int groupNum = i; - final String group = "groupconcurrent"+groupNum; + final String group = "twin" + groupNum; groups.add(group); - + ListenableFuture future = executor.submit(new Callable() { public NodeMetadata call() throws Exception { - NodeMetadata node = getOnlyElement(client.createNodesInGroup(group, 1, - inboundPorts(22, 8080).blockOnPort(22, 300+groupNum))); - getAnonymousLogger().info("Started node "+node.getId()); + NodeMetadata node = getOnlyElement(client.createNodesInGroup(group, 1, inboundPorts(22, 8080) + .blockOnPort(22, 300 + groupNum))); + getAnonymousLogger().info("Started node " + node.getId()); return node; - }}); + } + }); futures.add(future); } - + ListenableFuture> compoundFuture = Futures.allAsList(futures); compoundFuture.get(timeoutMs, TimeUnit.MILLISECONDS); - + } finally { for (String group : groups) { client.destroyNodesMatching(inGroup(group));