@Override public void resumeNode(String id) { // We have to wait here, as the api does not properly populate the state // but fails if there is a pending event int dropletId = Integer.parseInt(id); api.dropletApi().powerOn(dropletId); checkState(nodeRunningPredicate.apply(dropletId), "node did not started in the configured timeout"); }
@Override public void resumeNode(String id) { // We have to wait here, as the api does not properly populate the state // but fails if there is a pending event int dropletId = Integer.parseInt(id); api.dropletApi().powerOn(dropletId); checkState(nodeRunningPredicate.apply(dropletId), "node did not started in the configured timeout"); }
@Override public void resumeNode(String id) { // We have to wait here, as the api does not properly populate the state // but fails if there is a pending event int dropletId = Integer.parseInt(id); api.dropletApi().powerOn(dropletId); checkState(nodeRunningPredicate.apply(dropletId), "node did not started in the configured timeout"); }
@Test(groups = "live", dependsOnMethods = "testPowerOff") public void testPowerOn() { api().powerOn(dropletId); assertNodeRunning(dropletId); }
api.dropletApi().powerOn(dropletId); checkState(nodeRunningPredicate.apply(dropletId), "node was not powered on in the configured timeout");
api.dropletApi().powerOn(dropletId); checkState(nodeRunningPredicate.apply(dropletId), "node was not powered on in the configured timeout");
api.dropletApi().powerOn(dropletId); checkState(nodeRunningPredicate.apply(dropletId), "node was not powered on in the configured timeout");
public void testPowerOn() throws InterruptedException { server.enqueue(jsonResponse("/power-on.json")); Action action = api.dropletApi().powerOn(1); assertEquals(action, actionFromResource("/power-on.json")); assertEquals(server.getRequestCount(), 1); assertSent(server, "POST", "/droplets/1/actions", "{\"type\":\"power_on\"}"); }