From ed3c317ed9182538747f74713154ad94e9d866db Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 4 Sep 2015 22:21:41 +0200 Subject: [PATCH] Fixed functional test that validates graceful ovs agent restart The async_ping function returns a callable that returns True when all ping futures are done. Since those futures are running for 10 secs, there was no chance that the result of the callable was True. The test was bailing out without calling bridge reset even a single time, effectively leaving the feature untested in gate. Another thing to note is that for some reason the patch fixed oslo rootwrap errors in the test when executed locally. Since I still don't understand how it's possible that it fixes the issue for me, I mark the bug as related only, and will track logstash after it's merged to see whether it applies unknown magic to gate jobs too. Change-Id: Iaa977abddf1a0c6af7e964f1a5cd545ffb79585a Related-Bug: #1490051 --- neutron/tests/functional/agent/test_l2_ovs_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/tests/functional/agent/test_l2_ovs_agent.py b/neutron/tests/functional/agent/test_l2_ovs_agent.py index fbfc39355..33aa11a31 100644 --- a/neutron/tests/functional/agent/test_l2_ovs_agent.py +++ b/neutron/tests/functional/agent/test_l2_ovs_agent.py @@ -100,7 +100,7 @@ class TestOVSAgent(base.OVSAgentTestFramework): create_tunnels=False) self.wait_until_ports_state(self.ports, up=True) ips = [port['fixed_ips'][0]['ip_address'] for port in self.ports] - with net_helpers.async_ping(self.namespace, ips) as running: - while running(): + with net_helpers.async_ping(self.namespace, ips) as done: + while not done(): self.agent.setup_integration_br() time.sleep(0.25) -- 2.45.2