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 <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2018-01-15 15:57:48 +05:30 committed by GitHub
parent fa7c1e2e65
commit 7d144e146a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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: