Merge "test_ha_router: wait until two agents are scheduled" into stable/pike

This commit is contained in:
Jenkins 2017-09-09 02:57:54 +00:00 committed by Gerrit Code Review
commit ac9b927416
1 changed files with 6 additions and 3 deletions

View File

@ -232,9 +232,12 @@ class TestHAL3Agent(TestL3Agent):
tenant_id = uuidutils.generate_uuid()
router = self.safe_client.create_router(tenant_id, ha=True)
agents = self.client.list_l3_agent_hosting_routers(router['id'])
self.assertEqual(2, len(agents['agents']),
'HA router must be scheduled to both nodes')
common_utils.wait_until_true(
lambda:
len(self.client.list_l3_agent_hosting_routers(
router['id'])['agents']) == 2,
timeout=90)
common_utils.wait_until_true(
functools.partial(