From 03e35bb9af6e15c7182ac03eb55b15f9d15a5113 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Sat, 18 Jan 2020 08:46:26 +0100 Subject: [PATCH] Fix test pool to prevent immutability state errors When a test method completes it must assert its resources are in a mutable state or following test methods in same test class can fail to create, update and delete shared test class resources. This problem has been recently seen in upstream CI [1]. The test method was not waiting for the load balancer to come back up after a CUD operation in its child resources, resulting in the next test method execution failing to create a pool on the test class-level load balancer. [1] https://zuul.opendev.org/t/openstack/build/ \ 5d8eb87364c84480b54c87fd6966dbf4/log/controller/logs/tempest_log.txt#7968 Story: 2007187 Task: 38313 Change-Id: I487b1fc7e3de8724b16b6f8eabad5e69f5009758 --- octavia_tempest_plugin/tests/scenario/v2/test_pool.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_pool.py b/octavia_tempest_plugin/tests/scenario/v2/test_pool.py index 7a97b845..31f01784 100644 --- a/octavia_tempest_plugin/tests/scenario/v2/test_pool.py +++ b/octavia_tempest_plugin/tests/scenario/v2/test_pool.py @@ -216,3 +216,10 @@ class PoolScenarioTest(test_base.LoadBalancerBaseTest): const.PROVISIONING_STATUS, CONF.load_balancer.check_interval, CONF.load_balancer.check_timeout) + + waiters.wait_for_status( + self.mem_lb_client.show_loadbalancer, + self.lb_id, const.PROVISIONING_STATUS, + const.ACTIVE, + CONF.load_balancer.check_interval, + CONF.load_balancer.check_timeout)