From 9dfe1acd2ab1b6ceb6bb441822410d3ac131a1db Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 27 Feb 2021 23:02:53 -0500 Subject: [PATCH] tests: Remove sleep(60) and look for convergence Sleeping when convergence is not guaranteed in 60 seconds and then testing the rib to see if it has the data is not a great way to have a test complete all the time. Modify the code so that we check for convergence and if we have converged then look in the rib. Signed-off-by: Donald Sharp --- .../topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py index 87f391ae49..439738c725 100644 --- a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py +++ b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py @@ -1475,8 +1475,8 @@ def test_evpn_routes_from_VNFs_p1(request): tgen, dut, intf_name, intf_ipv6, vrf, create=False ) - logger.info("Wait for 60 sec.") - sleep(60) + result = verify_bgp_convergence(tgen, topo, dut) + assert result is True, "Failed to converge on {}".format(dut) step( "Verify that DCG-2 receives EVPN routes corresponding to " -- 2.39.5