]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Reduce wait intervals in test_bgp_snmp_bgp4v2mib 15234/head
authorDavid Schweizer <dschweizer@opensourcerouting.org>
Wed, 7 Feb 2024 12:50:53 +0000 (13:50 +0100)
committerDavid Schweizer <dschweizer@opensourcerouting.org>
Wed, 7 Feb 2024 12:56:10 +0000 (13:56 +0100)
Remove sleep time in test_bgp_snmp_bgp4v2mib before run_and_expect and
reduce wait intervals for faster test convergence.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
tests/topotests/bgp_snmp_bgp4v2mib/test_bgp_snmp_bgp4v2mib.py

index 8cd49e35483f1ec382a3ba0becc6b14a68bfa202..c296aaaf6d52a181374edbd58e68c0ee65df5907 100755 (executable)
@@ -276,7 +276,7 @@ def test_bgp_snmp_bgp4v2():
         pytest.skip(error_msg)
 
     rr.vtysh_cmd("clear bgp *")
-    _, result = topotest.run_and_expect(_snmptrap_ipv4, True, count=2, wait=10)
+    _, result = topotest.run_and_expect(_snmptrap_ipv4, True, count=30, wait=1)
     assertmsg = "Can't fetch SNMP trap for ipv4"
     assert result, assertmsg
 
@@ -308,8 +308,7 @@ def test_bgp_snmp_bgp4v2():
     r2.vtysh_cmd("conf\nbgp snmp traps bgp4-mibv2")
     r2.vtysh_cmd("conf\nno bgp snmp traps rfc4273")
     rr.vtysh_cmd("clear bgp *")
-    sleep(30)
-    _, result = topotest.run_and_expect(_snmptrap_ipv6, True, count=2, wait=10)
+    _, result = topotest.run_and_expect(_snmptrap_ipv6, True, count=60, wait=1)
     assertmsg = "Can't fetch SNMP trap for ipv6"
     assert result, assertmsg