From eda0eebfb54a092822a7814ea3e05470be87cfa3 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Mon, 19 Apr 2010 14:49:17 -0400 Subject: [PATCH] corrected timeout in terremark; cleanup --- .../java/org/jclouds/compute/options/GetNodesOptions.java | 2 -- .../main/java/org/jclouds/compute/util/ComputeUtils.java | 1 + .../org/jclouds/vcloud/terremark/TerremarkVCloudClient.java | 3 +-- .../vcloud/terremark/TerremarkVCloudClientLiveTest.java | 6 +++++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/compute/src/main/java/org/jclouds/compute/options/GetNodesOptions.java b/compute/src/main/java/org/jclouds/compute/options/GetNodesOptions.java index 8af03190dd..2a3a3ea125 100755 --- a/compute/src/main/java/org/jclouds/compute/options/GetNodesOptions.java +++ b/compute/src/main/java/org/jclouds/compute/options/GetNodesOptions.java @@ -1,7 +1,5 @@ package org.jclouds.compute.options; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; /** * @author Ivan Meredith diff --git a/compute/src/main/java/org/jclouds/compute/util/ComputeUtils.java b/compute/src/main/java/org/jclouds/compute/util/ComputeUtils.java index 3f8741468d..7055a528d4 100644 --- a/compute/src/main/java/org/jclouds/compute/util/ComputeUtils.java +++ b/compute/src/main/java/org/jclouds/compute/util/ComputeUtils.java @@ -218,6 +218,7 @@ public class ComputeUtils { node.getId())); } + @SuppressWarnings("unchecked") public Map, T> transform(Map, ListenableFuture> responses) { Map, T> actualResponses = Maps.newHashMap(); for (Map.Entry, ListenableFuture> entry : responses.entrySet()) { diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkVCloudClient.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkVCloudClient.java index eafd858e42..622840a5ef 100644 --- a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkVCloudClient.java +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/TerremarkVCloudClient.java @@ -46,7 +46,7 @@ import org.jclouds.vcloud.terremark.options.AddNodeOptions; * @see * @author Adrian Cole */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) +@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface TerremarkVCloudClient extends VCloudClient { /** @@ -129,7 +129,6 @@ public interface TerremarkVCloudClient extends VCloudClient { void deleteNode(int nodeId); - @Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) SortedSet getNodes(int internetServiceId); SortedSet getIpAddressesForNetwork(String networkId); diff --git a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/TerremarkVCloudClientLiveTest.java b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/TerremarkVCloudClientLiveTest.java index 1c93bcb462..a579f4469f 100644 --- a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/TerremarkVCloudClientLiveTest.java +++ b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/TerremarkVCloudClientLiveTest.java @@ -156,7 +156,11 @@ public class TerremarkVCloudClientLiveTest extends VCloudClientLiveTest { @Test public void testInstantiateAndPowerOn() throws InterruptedException, ExecutionException, TimeoutException, IOException { - String serverName = "adriantest"; + StringBuffer name = new StringBuffer(); + for (int i = 0; i < 15; i++) + name.append("a"); + String serverName = name.toString();// "adriantest"; + long hardDisk = 4194304; String expectedOs = "Ubuntu Linux (32-bit)";