Change pool create scenario test to wait for operating status
The API test for pool creation has a check to wait for the operating status of a pool to transition to ONLINE if a listener has been provided. The scenario test for pool creation doesn't wait for any operating status transition after a pool is created with a listener, and instead always assumes it's OFFLINE. They should both wait for a transition, since otherwise drivers that transition to ONLINE quickly, like OVN, can race and fail the scenario test. Depends-on: https://review.opendev.org/c/openstack/octavia/+/763530 Change-Id: I9eb3c7ce8af879cd910b06234c99b53670907e49 Story: 2008009 Task: 40659
This commit is contained in:
parent
d5efbb16f7
commit
aaa6fc7fde
@ -443,6 +443,8 @@ class PoolAPITest(test_base.LoadBalancerBaseTest):
|
||||
const.ONLINE,
|
||||
CONF.load_balancer.build_interval,
|
||||
CONF.load_balancer.build_timeout)
|
||||
else:
|
||||
self.assertEqual(const.OFFLINE, pool[const.OPERATING_STATUS])
|
||||
|
||||
self.assertEqual(pool_name, pool[const.NAME])
|
||||
self.assertEqual(pool_description, pool[const.DESCRIPTION])
|
||||
|
@ -434,7 +434,6 @@ class PoolScenarioTest(test_base.LoadBalancerBaseTest):
|
||||
parser.parse(pool[const.CREATED_AT])
|
||||
parser.parse(pool[const.UPDATED_AT])
|
||||
UUID(pool[const.ID])
|
||||
self.assertEqual(const.OFFLINE, pool[const.OPERATING_STATUS])
|
||||
self.assertEqual(pool_protocol, pool[const.PROTOCOL])
|
||||
self.assertEqual(1, len(pool[const.LOADBALANCERS]))
|
||||
self.assertEqual(self.lb_id, pool[const.LOADBALANCERS][0][const.ID])
|
||||
@ -443,6 +442,7 @@ class PoolScenarioTest(test_base.LoadBalancerBaseTest):
|
||||
self.assertEqual(listener_id, pool[const.LISTENERS][0][const.ID])
|
||||
else:
|
||||
self.assertEmpty(pool[const.LISTENERS])
|
||||
self.assertEqual(const.OFFLINE, pool[const.OPERATING_STATUS])
|
||||
self.assertEqual(algorithm, pool[const.LB_ALGORITHM])
|
||||
|
||||
if session_persistence == const.SESSION_PERSISTENCE_APP_COOKIE:
|
||||
@ -510,6 +510,13 @@ class PoolScenarioTest(test_base.LoadBalancerBaseTest):
|
||||
self.assertEqual(new_description, pool[const.DESCRIPTION])
|
||||
self.assertTrue(pool[const.ADMIN_STATE_UP])
|
||||
self.assertEqual(algorithm, pool[const.LB_ALGORITHM])
|
||||
if listener_protocol is not None:
|
||||
pool = waiters.wait_for_status(
|
||||
self.mem_pool_client.show_pool,
|
||||
pool[const.ID], const.OPERATING_STATUS,
|
||||
const.ONLINE,
|
||||
CONF.load_balancer.build_interval,
|
||||
CONF.load_balancer.build_timeout)
|
||||
|
||||
if session_persistence == const.SESSION_PERSISTENCE_APP_COOKIE:
|
||||
self.assertIsNotNone(pool.get(const.SESSION_PERSISTENCE))
|
||||
|
Loading…
x
Reference in New Issue
Block a user