CLOUDSTACK-3688: Test cases test_accounts.TestDomainForceRemove.test_forceDeleteDomain, not found the domain to delete and failed.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Sanjay Tripathi 2013-08-14 15:39:32 +05:30 committed by Prasanna Santhanam
parent 500545cb82
commit 151fc3e837
1 changed files with 10 additions and 6 deletions

View File

@ -1510,13 +1510,17 @@ class TestDomainForceRemove(cloudstackTestCase):
try:
domain.delete(self.apiclient, cleanup=True)
except Exception as e:
self.fail("Failed to delete domain: %s" % e)
self.debug("Waiting for account.cleanup.interval" +
" to cleanup any remaining resouces")
# Sleep 3*account.gc to ensure that all resources are deleted
wait_for_cleanup(self.apiclient, ["account.cleanup.interval"]*3)
with self.assertRaises(cloudstackAPIException):
Domain.list(
self.apiclient,
id=domain.id,
listall=True
)
self.debug("Waiting for account.cleanup.interval" +
" to cleanup any remaining resouces")
# Sleep 2*account.gc to ensure that all resources are deleted
wait_for_cleanup(self.apiclient, ["account.cleanup.interval"]*2)
self.debug("Checking if the resources in domain are deleted")
with self.assertRaises(cloudstackAPIException):
Account.list(