From 2b2445b0df8a0ce39131362279d0f0554fc00b63 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 15 Jan 2018 15:40:58 +0530 Subject: [PATCH] CLOUDSTACK-10227: Add delay before reverting VM snapshot 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 4bfe66a826fd..a6803b80edaf 100644 --- a/test/integration/smoke/test_vm_snapshots.py +++ b/test/integration/smoke/test_vm_snapshots.py @@ -513,7 +513,8 @@ def test_change_service_offering_for_vm_with_snapshots(self): 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: