From 151fc3e8375ad5fea2f2e5d07445b5c40f02b59f Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Wed, 14 Aug 2013 15:39:32 +0530 Subject: [PATCH] CLOUDSTACK-3688: Test cases test_accounts.TestDomainForceRemove.test_forceDeleteDomain, not found the domain to delete and failed. Signed-off-by: Prasanna Santhanam --- test/integration/component/test_accounts.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py index 06b78e67ef6..fafcf9a75db 100644 --- a/test/integration/component/test_accounts.py +++ b/test/integration/component/test_accounts.py @@ -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(