]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: Slow bgp_default_originate test down slightly
authorDonald Sharp <sharpd@nvidia.com>
Fri, 19 May 2023 20:03:57 +0000 (16:03 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 22 May 2023 14:06:07 +0000 (10:06 -0400)
The test is performing these steps:

a) get timestamp of route installed in zebra
b) <make changes>
c) get new timestamp of route installed in zebra

If < 1 second happens between A and C the test
assumes that something went wrong, as that it is
testing to see if the route was reinstalled <yes I know>.

Just sleep 1 second after a) happens so that if a reinstall
happens we can easily see it, and we also know that if a
reinstall doesn't happen then the new timestamp will
always be 1 second or greater.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py

index 50c34d45fad7f7cf7692c65946c6a52795fdc1fc..8058823baf5b1fbd3ff8411054f446a629ffe8d2 100644 (file)
@@ -19,6 +19,7 @@ import pytest
 import datetime
 from copy import deepcopy
 from lib.topolog import logger
+from time import sleep
 
 # pylint: disable=C0413
 # Import topogen and topotest helpers
@@ -592,6 +593,7 @@ def test_verify_bgp_default_originate_with_default_static_route_p1(request):
     step("Taking uptime snapshot before configuring default - originate")
     uptime_before_ipv4 = get_rib_route_uptime(tgen, "ipv4", "r2", ipv4_uptime_dict)
     uptime_before_ipv6 = get_rib_route_uptime(tgen, "ipv6", "r2", ipv6_uptime_dict)
+    sleep(1)
 
     step(
         "Configure default-originate on R1 link-1 again for IPv4 and IPv6 address family"
@@ -1031,6 +1033,7 @@ def test_verify_bgp_default_originate_with_default_static_route_p1(request):
     step("Taking uptime snapshot before  removing   redisctribute static ")
     uptime_before_ipv4 = get_rib_route_uptime(tgen, "ipv4", "r2", ipv4_uptime_dict)
     uptime_before_ipv6 = get_rib_route_uptime(tgen, "ipv6", "r2", ipv6_uptime_dict)
+    sleep(1)
 
     step("Remove redistribute static from IPv4 and IPv6 address family ")
     input_dict_1 = {