Merge "Functional tests: change assert to wait_until_true" into stable/newton

This commit is contained in:
Jenkins 2017-08-16 18:57:11 +00:00 committed by Gerrit Code Review
commit faa9d43dd5
1 changed files with 6 additions and 2 deletions

View File

@ -302,14 +302,18 @@ class L3AgentTestFramework(base.BaseSudoTestCase):
if enable_ha:
self._assert_ha_device(router)
self.assertTrue(router.keepalived_manager.get_process().active)
common_utils.wait_until_true(
lambda: router.keepalived_manager.get_process().active,
timeout=15)
self._delete_router(self.agent, router.router_id)
self._assert_interfaces_deleted_from_ovs()
self._assert_router_does_not_exist(router)
if enable_ha:
self.assertFalse(router.keepalived_manager.get_process().active)
common_utils.wait_until_true(
lambda: not router.keepalived_manager.get_process().active,
timeout=15)
return return_copy
def manage_router(self, agent, router):