Issue 77: workaround to Web Hosting #119335

git-svn-id: http://jclouds.googlecode.com/svn/trunk@1831 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-07-22 11:47:42 +00:00
parent d01b0606c8
commit fd9e281069
2 changed files with 16 additions and 2 deletions

View File

@ -27,6 +27,14 @@ package org.jclouds.rackspace.cloudservers.domain;
*
* Servers contain a status attribute that can be used as an indication of the current server state.
* Servers with an ACTIVE status are available for use.
* <p/>
* <h2>Note</h2>
* When the system changes a server's status from BUILD to ACTIVE the system will not be immediately
* available. The 'ACTIVE' label is really misleading in the fact that it just means the system
* doesn't have any activity going on related to it's configuration.
* <p/>
* Processes such as ssh will not be available until 5-10 seconds following the phase ACTIVE
* <ul><li>[Web Hosting #119335]</li></ul>
*
* @author Adrian Cole
*/

View File

@ -307,11 +307,17 @@ public class CloudServersConnectionLiveTest {
}
private void blockUntilActive(int serverId) throws InterruptedException {
for (Server currentDetails = connection.getServer(serverId); currentDetails.getStatus() != ServerStatus.ACTIVE; currentDetails = connection
Server currentDetails = null;
for (currentDetails = connection.getServer(serverId); currentDetails.getStatus() != ServerStatus.ACTIVE; currentDetails = connection
.getServer(serverId)) {
System.out.printf("blocking on status active%n%s%n", currentDetails);
Thread.sleep(5 * 1000);
}
/**
* [Web Hosting #119335]
*/
System.out.printf("awaiting daemons to start %n%s%n", currentDetails);
Thread.sleep(10 * 1000);
}
@Test(timeOut = 5 * 60 * 1000, dependsOnMethods = "testCreateServer")
@ -348,7 +354,7 @@ public class CloudServersConnectionLiveTest {
doCheckPass(newDetails, pass);
} catch (SshException e) {// try twice in case there is a network timeout
try {
Thread.sleep(2 * 1000);
Thread.sleep(10 * 1000);
} catch (InterruptedException e1) {
}
doCheckPass(newDetails, pass);