From 12a939b7e7d13f64e9e07b7fd604fd7156028859 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 19 Feb 2020 07:56:50 -0500 Subject: [PATCH] tests: bgp_multiview_topo1 was taking too long The bgp_multiview_topo1 test had two issues a) An abbundance of sleeps that are not necessary b) The convergence time was too short. The upshoot of this is that the test goes from 72 -> 33 seconds run time on my machine. Signed-off-by: Donald Sharp --- .../bgp_multiview_topo1/test_bgp_multiview_topo1.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py index 7607fe986b..c851567dda 100755 --- a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py +++ b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py @@ -151,8 +151,7 @@ def setup_module(module): net['r%s' % i].startRouter() # Starting PE Hosts and init ExaBGP on each of them - print('*** Starting BGP on all 8 Peers in 10s') - sleep(10) + print('*** Starting BGP on all 8 Peers') for i in range(1, 9): net['peer%s' % i].cmd('cp %s/exabgp.env /etc/exabgp/exabgp.env' % thisDir) net['peer%s' % i].cmd('cp %s/peer%s/* /etc/exabgp/' % (thisDir, i)) @@ -191,7 +190,6 @@ def test_router_running(): print("\n\n** Check if FRR/Quagga is running on each Router node") print("******************************************\n") - sleep(5) # Starting Routers for i in range(1, 2): @@ -215,7 +213,7 @@ def test_bgp_converge(): # Wait for BGP to converge (All Neighbors in either Full or TwoWay State) print("\n\n** Verify for BGP to converge") print("******************************************\n") - timeout = 60 + timeout = 125 while timeout > 0: print("Timeout in %s: " % timeout), sys.stdout.flush() @@ -240,9 +238,9 @@ def test_bgp_converge(): bgpStatus = net['r%s' % i].cmd('vtysh -c "show ip bgp view %s summary"' % view) assert False, "BGP did not converge:\n%s" % bgpStatus - # Wait for an extra 30s to announce all routes - print('Waiting 30s for routes to be announced'); - sleep(30) + # Wait for an extra 5s to announce all routes + print('Waiting 5s for routes to be announced'); + sleep(5) print("BGP converged.")