diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2021-10-05 12:37:34 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2021-10-05 12:41:33 -0300 |
| commit | 2d28cbe66137397dcd3416b97edc99f982f1b988 (patch) | |
| tree | 4c51d8044be69d4cbeb1cc31dca19924e04e8646 /tests/topotests/bfd_ospf_topo1 | |
| parent | 8ff24fd29effe974d870309bfb7bc89f39de0024 (diff) | |
topotests: justify code sleep
Document the `sleep` statement so people know that we are sleeping
because we are waiting for the BFD down notification. If we don't
sleep here it is possible that we get outdated `show` command results.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'tests/topotests/bfd_ospf_topo1')
| -rwxr-xr-x | tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py b/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py index 33245b64c8..bef2c3f162 100755 --- a/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py +++ b/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py @@ -195,8 +195,8 @@ def test_bfd_ospf_interface_failure_rt2_step3(): # By default BFD provides a recovery time of 900ms plus jitter, so let's wait # initial 2 seconds to let the CI not suffer. - # TODO: add check for array size - sleep(2) + topotest.sleep(2, 'Wait for BFD down notification') + router_compare_json_output( "rt1", "show ip route ospf json", "step3/show_ip_route_rt2_down.ref", 1, 0 ) @@ -234,8 +234,7 @@ def test_bfd_ospf_interface_failure_rt3_step3(): # By default BFD provides a recovery time of 900ms plus jitter, so let's wait # initial 2 seconds to let the CI not suffer. - # TODO: add check for array size - sleep(2) + topotest.sleep(2, 'Wait for BFD down notification') router_compare_json_output( "rt1", "show ip route ospf json", "step3/show_ip_route_rt3_down.ref", 1, 0 ) |
