From: Zane Bitter Date: Thu, 13 Sep 2012 19:40:49 +0000 (+0200) Subject: tests: Wait for delete completion X-Git-Tag: 2014.1~1416 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f397d7ad5292689ce106dd7de9579651a6d2be4c;p=openstack-build%2Fheat-build.git tests: Wait for delete completion Wait for the stack to actually be deleted before ending the test. Fixes #233 Change-Id: I4f2060ff73615bcb16ac9cba3d7062117cca08dd Signed-off-by: Zane Bitter --- diff --git a/heat/tests/functional/util.py b/heat/tests/functional/util.py index e44bba10..b039d193 100644 --- a/heat/tests/functional/util.py +++ b/heat/tests/functional/util.py @@ -388,6 +388,14 @@ class Stack(object): c = self.get_heat_client() c.delete_stack(**parameters) + print 'Waiting for stack deletion to be completed' + while self.in_state('DELETE_IN_PROGRESS'): + tries += 1 + assert tries < 50 + time.sleep(10) + + assert self.in_state('DELETE_COMPLETE') + def get_nova_client(self): if self.novaclient != None: return self.novaclient