]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fixed functional test that validates graceful ovs agent restart
authorIhar Hrachyshka <ihrachys@redhat.com>
Fri, 4 Sep 2015 20:21:41 +0000 (22:21 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Fri, 4 Sep 2015 20:28:42 +0000 (22:28 +0200)
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

index fbfc3935595b61a558913127b87c548220593f70..33aa11a31b55d7dcc1029ae35d5626702165ed67 100644 (file)
@@ -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)