@Test(enabled = false) // TODO public void testStopAndStartServer() throws Exception { client.stopServer(testServerId); assertTrue(serverStatusChecker.apply(Server.State.STOPPED)); client.startServer(testServerId); assertTrue(serverStatusChecker.apply(Server.State.RUNNING)); }
@Test(enabled = false) // TODO work a better plan public void testRebootServer() throws Exception { long uptime = 0; while (uptime < 20) { uptime = client.getServerStatus(testServerId).getUptime().getCurrent(); } assertTrue(uptime > 19); client.rebootServer(testServerId); Thread.sleep(1000); uptime = client.getServerStatus(testServerId).getUptime().getCurrent(); assertTrue(uptime < 20); assertTrue(serverStatusChecker.apply(Server.State.RUNNING)); }
@BeforeMethod public void makeSureServerIsRunning() throws Exception { serverStatusChecker.apply(Server.State.RUNNING); }