From 213596360727a83497084981fda015d4dcff666e Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Fri, 31 May 2013 14:19:56 -0700 Subject: [PATCH] Fix an intermitting failure in test_metadata_refresh Given that resource creation can happen in parallel, the call to check_create_complete may not follow the call to handle_create, so mock those without checking the order. Change-Id: Icf40f7339dc4c6e885c4a42f3a2c3f546f14c08d --- heat/tests/test_metadata_refresh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/heat/tests/test_metadata_refresh.py b/heat/tests/test_metadata_refresh.py index c985df81..dcaf5c3a 100644 --- a/heat/tests/test_metadata_refresh.py +++ b/heat/tests/test_metadata_refresh.py @@ -145,7 +145,8 @@ class MetadataRefreshTest(HeatTestCase): self.m.StubOutWithMock(instance.Instance, 'check_create_complete') for cookie in (object(), object()): instance.Instance.handle_create().AndReturn(cookie) - instance.Instance.check_create_complete(cookie).AndReturn(True) + create_complete = instance.Instance.check_create_complete(cookie) + create_complete.InAnyOrder().AndReturn(True) self.m.StubOutWithMock(instance.Instance, 'FnGetAtt') return stack -- 2.45.2