mirror of https://github.com/apache/jclouds.git
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:
parent
d01b0606c8
commit
fd9e281069
|
@ -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 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.
|
* 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
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -307,11 +307,17 @@ public class CloudServersConnectionLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void blockUntilActive(int serverId) throws InterruptedException {
|
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)) {
|
.getServer(serverId)) {
|
||||||
System.out.printf("blocking on status active%n%s%n", currentDetails);
|
System.out.printf("blocking on status active%n%s%n", currentDetails);
|
||||||
Thread.sleep(5 * 1000);
|
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")
|
@Test(timeOut = 5 * 60 * 1000, dependsOnMethods = "testCreateServer")
|
||||||
|
@ -348,7 +354,7 @@ public class CloudServersConnectionLiveTest {
|
||||||
doCheckPass(newDetails, pass);
|
doCheckPass(newDetails, pass);
|
||||||
} catch (SshException e) {// try twice in case there is a network timeout
|
} catch (SshException e) {// try twice in case there is a network timeout
|
||||||
try {
|
try {
|
||||||
Thread.sleep(2 * 1000);
|
Thread.sleep(10 * 1000);
|
||||||
} catch (InterruptedException e1) {
|
} catch (InterruptedException e1) {
|
||||||
}
|
}
|
||||||
doCheckPass(newDetails, pass);
|
doCheckPass(newDetails, pass);
|
||||||
|
|
Loading…
Reference in New Issue