From: Donald Sharp Date: Fri, 19 May 2023 20:03:57 +0000 (-0400) Subject: tests: Slow bgp_default_originate test down slightly X-Git-Url: https://git.proxmox.com/?p=mirror_frr.git;a=commitdiff_plain;h=b9de32473d84c387d823fe9543a7f895f7c9fc54 tests: Slow bgp_default_originate test down slightly The test is performing these steps: a) get timestamp of route installed in zebra b) 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 . 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 --- diff --git a/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py b/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py index 50c34d45f..8058823ba 100644 --- a/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py +++ b/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py @@ -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 = {