From a2ab6fd8fa7d0f83baaca057306941c835cf3f74 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 7 Jul 2020 07:36:54 -0400 Subject: [PATCH] tests: Fix rare case in ospf tests due to small hello timer There exists the possiblity that the hello timer printed would show a time to expiration in this format: Hello due in 350 usecs The tests are looking for: Hello due in 5.430s Just notice that we may have gotten usecs and act accordingly Signed-off-by: Donald Sharp --- .../topotests/all-protocol-startup/test_all_protocol_startup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py index 14e00b9664..4602b039a6 100755 --- a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py +++ b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py @@ -599,6 +599,7 @@ def test_ospfv2_interfaces(): # Drop time in next due actual = re.sub(r"Hello due in [0-9\.]+s", "Hello due in XX.XXXs", actual) + actual = re.sub(r"Hello due in [0-9\.]+ usecs", "Hello due in XX.XXXs", actual) # Fix 'MTU mismatch detection: enabled' vs 'MTU mismatch detection:enabled' - accept both actual = re.sub(r"MTU mismatch detection:([a-z]+.*)", r"MTU mismatch detection: \1", actual) # Fix newlines (make them all the same) -- 2.39.5