diff --git a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java index e0c3565162..55f9c8b73e 100644 --- a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java @@ -72,7 +72,7 @@ public abstract class BaseComputeServiceLiveTest { protected String service; protected SshClient.Factory sshFactory; protected RunNodeOptions options = RunNodeOptions.Builder.openPorts(22); - private String nodeName; + protected String nodeName; private RetryablePredicate socketTester; private CreateNodeResponse node; @@ -85,7 +85,7 @@ public abstract class BaseComputeServiceLiveTest { @BeforeGroups(groups = { "live" }) public void setupClient() throws InterruptedException, ExecutionException, TimeoutException, IOException { - nodeName = checkNotNull(service, "service"); + if (nodeName == null) nodeName = checkNotNull(service, "service"); user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); context = new ComputeServiceContextFactory().createContext(service, user, password, @@ -135,7 +135,7 @@ public abstract class BaseComputeServiceLiveTest { node = client.runNode(nodeName, template, options); assertNotNull(node.getId()); assertNotNull(node.getName()); - assertEquals(node.getPublicAddresses().size(), 1); + assert node.getPublicAddresses().size() >= 1: "no public ips in" + node; assertNotNull(node.getCredentials()); if (node.getCredentials().account != null) { assertNotNull(node.getCredentials().account); diff --git a/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java b/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java index 4d176c005b..21edd91bdf 100644 --- a/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java +++ b/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/RimuHostingClient.java @@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit; * @see RimuHostingAsyncClient * @see */ -@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES) +@Timeout(duration = 40, timeUnit = TimeUnit.MINUTES) public interface RimuHostingClient { SortedSet getImageList(); diff --git a/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeService.java b/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeService.java index 23e5cc5448..ae618278c2 100644 --- a/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeService.java +++ b/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeService.java @@ -93,12 +93,12 @@ public class RimuHostingComputeService implements ComputeService { public CreateNodeResponse runNode(String name, Template template, RunNodeOptions options) { NewServerResponse serverResponse = client.createServer(name, checkNotNull(template.getImage() .getId(), "imageId"), checkNotNull(template.getSize().getId(), "sizeId")); - return new CreateNodeResponseImpl(null,// dunno why there is no information here.... + return new CreateNodeResponseImpl(serverResponse.getServer().getId().toString(), name, location, null, ImmutableMap. of(), NodeState.UNKNOWN,// TODO // need a // real // state! - ImmutableList. of(),// no real useful data here.. + getPublicAddresses(serverResponse.getServer()),// no real useful data here.. ImmutableList. of(), new Credentials("root", serverResponse .getNewInstanceRequest().getCreateOptions().getPassword()), ImmutableMap . of()); diff --git a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java index 7c85369827..2db34281be 100644 --- a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java +++ b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingClientLiveTest.java @@ -72,15 +72,16 @@ public class RimuHostingClientLiveTest { @Test public void testLifeCycle() { //Get the first image, we dont really care what it is in this test. - NewServerResponse serverResponse = connection.createServer("test.jclouds.org", "lenny", "MIRO1B"); + NewServerResponse serverResponse = connection.createServer("test.ivan.api.com", "lenny", "MIRO1B"); Server server = serverResponse.getServer(); //Now we have the server, lets restart it assertNotNull(server.getId()); ServerInfo serverInfo = connection.restartServer(server.getId()); - connection.destroyServer(server.getId()); + //Should be running now. assertEquals(serverInfo.getState(), RunningState.RUNNING); - assertEquals(server.getName(),"test.jclouds.org"); + assertEquals(server.getName(),"test.ivan.api.com"); assertEquals(server.getImageId(), "lenny"); + connection.destroyServer(server.getId()); } } diff --git a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingComputeClientLiveTest.java b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingComputeClientLiveTest.java index bf0677d6a5..e8959130aa 100644 --- a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingComputeClientLiveTest.java +++ b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/RimuHostingComputeClientLiveTest.java @@ -58,7 +58,7 @@ public class RimuHostingComputeClientLiveTest { public void testPowerOn() throws InterruptedException, ExecutionException, TimeoutException, IOException { String imageId = "lenny"; - String serverName = "test.jclouds.org"; + String serverName = "test.compute.jclouds.org"; String planId = "MIRO1B"; id = client.start(serverName, planId, imageId); diff --git a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java index 556c2abb73..937db6bff5 100755 --- a/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java +++ b/rimuhosting/src/test/java/org/jclouds/rimuhosting/miro/compute/RimuHostingComputeServiceLiveTest.java @@ -36,10 +36,11 @@ public class RimuHostingComputeServiceLiveTest extends BaseComputeServiceLiveTes @Override public void setServiceDefaults() { service = "rimuhosting"; + nodeName = "rimuhosting.jclouds"; } protected Template buildTemplate(TemplateBuilder templateBuilder) { - return templateBuilder.osFamily(UBUNTU).smallest().build(); + return templateBuilder.osFamily(UBUNTU).sizeId("MIRO1B").build(); } @Override