]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Fix rare case in ospf tests due to small hello timer
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 7 Jul 2020 11:36:54 +0000 (07:36 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 7 Jul 2020 11:36:54 +0000 (07:36 -0400)
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 <sharpd@cumulusnetworks.com>
tests/topotests/all-protocol-startup/test_all_protocol_startup.py

index 14e00b9664af4b8416c123631dfc5748847db034..4602b039a643e8906f93dc0ed7f7cfe7a2e9ad0f 100755 (executable)
@@ -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)