Fix wait_until_true condition in dhcp test

Need to actually check something that might change. :)

Change-Id: I76577da5683271515f487081063c00e4fc0d864d
This commit is contained in:
Kevin Benton 2016-07-20 04:18:41 -07:00
parent a6ea51e962
commit 97c78ef0cc
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)