diff --git a/test/TestREST.py b/test/TestREST.py index d70681bdc..894406416 100755 --- a/test/TestREST.py +++ b/test/TestREST.py @@ -293,10 +293,12 @@ def test_57_reconfigure_list(self): self.assertTrue(all_configured, msg="ERROR waiting the infrastructure to be configured (timeout).") def test_60_stop(self): + time.sleep(10) self.server.request('PUT', "/infrastructures/" + self.inf_id + "/stop", headers = {"Content-type": "application/x-www-form-urlencoded", 'AUTHORIZATION' : self.auth_data}) resp = self.server.getresponse() output = str(resp.read()) self.assertEqual(resp.status, 200, msg="ERROR stopping the infrastructure:" + output) + time.sleep(10) all_stopped = self.wait_inf_state(VirtualMachine.STOPPED, 120, [VirtualMachine.RUNNING]) self.assertTrue(all_stopped, msg="ERROR waiting the infrastructure to be stopped (timeout).") @@ -308,15 +310,18 @@ def test_70_start(self): resp = self.server.getresponse() output = str(resp.read()) self.assertEqual(resp.status, 200, msg="ERROR starting the infrastructure:" + output) + time.sleep(10) all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 120, [VirtualMachine.RUNNING]) self.assertTrue(all_configured, msg="ERROR waiting the infrastructure to be started (timeout).") def test_80_stop_vm(self): + time.sleep(10) self.server.request('PUT', "/infrastructures/" + self.inf_id + "/vms/0/stop", headers = {"Content-type": "application/x-www-form-urlencoded", 'AUTHORIZATION' : self.auth_data}) resp = self.server.getresponse() output = str(resp.read()) self.assertEqual(resp.status, 200, msg="ERROR stopping the vm:" + output) + time.sleep(10) all_stopped = self.wait_inf_state(VirtualMachine.STOPPED, 120, [VirtualMachine.RUNNING], ["/infrastructures/" + self.inf_id + "/vms/0"]) self.assertTrue(all_stopped, msg="ERROR waiting the infrastructure to be stopped (timeout).") @@ -328,6 +333,7 @@ def test_90_start_vm(self): resp = self.server.getresponse() output = str(resp.read()) self.assertEqual(resp.status, 200, msg="ERROR starting the vm:" + output) + time.sleep(10) all_configured = self.wait_inf_state(VirtualMachine.CONFIGURED, 120, [VirtualMachine.RUNNING], ["/infrastructures/" + self.inf_id + "/vms/0"]) self.assertTrue(all_configured, msg="ERROR waiting the vm to be started (timeout).")