Skip to content

Commit b86123a

Browse files
committed
[FT] Improve test_assert_pings_during_br_phys_setup_not_lost* tests
The tests ``test_assert_pings_during_br_phys_setup_not_lost*`` check if the ping is possible between two ports created on physical networks (VLAN or flat). Now the method that creates the physical bridges on the OVS agent ``setup_physical_bridges`` is executed once. The loop to check the ping between the two ports uses a ``ThreadPoolExecutor``, thus it is possible to execute and check several pings at the same time. Closes-Bug: #2107775 Change-Id: I14ec444a4aff3d09b0b8fff8d44f6964e8f7eb5d (cherry picked from commit 7b2d968)
1 parent ecdb6ed commit b86123a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

neutron/tests/functional/agent/test_l2_ovs_agent.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,9 @@ def _test_assert_pings_during_br_phys_setup_not_lost(self, provider_net):
302302
net_helpers.assert_ping(ns_phys, ip_int)
303303
net_helpers.assert_ping(self.namespace, ip_phys)
304304

305-
with net_helpers.async_ping(ns_phys, [ip_int]) as done:
305+
with net_helpers.async_ping(ns_phys, [ip_int, ip_phys]) as done:
306+
self.agent.setup_physical_bridges(self.agent.bridge_mappings)
306307
while not done():
307-
self.agent.setup_physical_bridges(self.agent.bridge_mappings)
308-
time.sleep(0.25)
309-
310-
with net_helpers.async_ping(self.namespace, [ip_phys]) as done:
311-
while not done():
312-
self.agent.setup_physical_bridges(self.agent.bridge_mappings)
313308
time.sleep(0.25)
314309

315310
def test_noresync_after_port_gone(self):

0 commit comments

Comments
 (0)