Merge "Fix wait_until_true condition in dhcp test"

This commit is contained in:
Jenkins 2016-07-20 13:21:56 +00:00 committed by Gerrit Code Review
commit 99cbcba48c
1 changed files with 2 additions and 2 deletions

View File

@ -80,10 +80,10 @@ class TestDhcp(functional_base.BaseSudoTestCase):
self.assertEqual(2, len(devices))
# setting up dhcp for the network
dev_mgr.setup(tests_base.AttributeDict(network))
devices = ipw.get_devices(exclude_loopback=True)
common_utils.wait_until_true(
lambda: 1 == len(devices),
lambda: 1 == len(ipw.get_devices(exclude_loopback=True)),
timeout=5,
sleep=0.1,
exception=RuntimeError("only one non-loopback device must remain"))
devices = ipw.get_devices(exclude_loopback=True)
self.assertEqual("tapfoo_port_id", devices[0].name)