From 448a6a7121f5af32d03ff419054dcaf5734ae811 Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Wed, 5 Jul 2017 11:46:49 +0200 Subject: [PATCH] Fix race in new condition test We're check the number of resources a bit early, let's wait a bit. Change-Id: I40160240cbc2c515c84569637c8a3af671082c60 --- heat_integrationtests/functional/test_create_update.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/heat_integrationtests/functional/test_create_update.py b/heat_integrationtests/functional/test_create_update.py index 4407138501..3d4ca76487 100644 --- a/heat_integrationtests/functional/test_create_update.py +++ b/heat_integrationtests/functional/test_create_update.py @@ -14,6 +14,7 @@ import copy import json +from heat_integrationtests.common import test from heat_integrationtests.functional import functional_base test_template_one_resource = { @@ -699,4 +700,11 @@ resources: template=updated_template, expected_status='UPDATE_IN_PROGRESS') - self.assertIn('test3', self.list_resources(stack_identifier)) + def check_resources(): + resources = self.list_resources(stack_identifier) + if len(resources) < 2: + return False + self.assertIn('test3', resources) + return True + + self.assertTrue(test.call_until_true(20, 2, check_resources))