From 7d144e146a0ae58230398b93ce7cbdf6db180518 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 15 Jan 2018 15:57:48 +0530 Subject: [PATCH] CLOUDSTACK-10227: Add delay before reverting VM snapshot (#2407) As discovered and discussed in #2376, adding some delay after stopping the VM and reverting VM snapshot passes the `test_change_service_offering_for_vm_with_snapshots` test case. The suspect here is userVMDao or background vmsync that may not update the VM state to PowerOff. Signed-off-by: Rohit Yadav --- test/integration/smoke/test_vm_snapshots.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py index 4bfe66a826f..a6803b80eda 100644 --- a/test/integration/smoke/test_vm_snapshots.py +++ b/test/integration/smoke/test_vm_snapshots.py @@ -513,7 +513,8 @@ class TestChangeServiceOfferingForVmWithSnapshots(cloudstackTestCase): virtual_machine.stop(self.apiclient) except Exception as e: self.fail("Failed to stop VM: %s" % e) - + + time.sleep(30) # 8) Revert to VM Snapshot self.debug("Revert to vm snapshot: %s" % vm_snapshot.id) try: