From f397d7ad5292689ce106dd7de9579651a6d2be4c Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 13 Sep 2012 21:40:49 +0200 Subject: [PATCH] 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 --- heat/tests/functional/util.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.45.2