From: Ihar Hrachyshka Date: Fri, 4 Sep 2015 20:21:41 +0000 (+0200) Subject: Fixed functional test that validates graceful ovs agent restart X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ed3c317ed9182538747f74713154ad94e9d866db;p=openstack-build%2Fneutron-build.git 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 --- 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)