]> git.puffer.fish Git - matthieu/frr.git/commitdiff
topotests: decrease result check frequency
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 5 Oct 2021 15:36:43 +0000 (12:36 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 5 Oct 2021 15:40:14 +0000 (12:40 -0300)
Call the `show` commands less often to reduce the CPU pressure.

Also increase the wait time from 60 to 80 seconds to have spare room
for failures (4 times more). This is the latest measure wait time:

> INFO: topolog: 'router_json_cmp' succeeded after 20.08 seconds

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py

index 09b86317404a4c38385390b382a464d3dd1c5e5e..33245b64c8704616b88014a6e78971c26cc6b6d1 100755 (executable)
@@ -132,7 +132,7 @@ def print_cmd_result(rname, command):
     print(get_topogen().gears[rname].vtysh_cmd(command, isjson=False))
 
 
-def router_compare_json_output(rname, command, reference, count=120, wait=0.5):
+def router_compare_json_output(rname, command, reference, count=40, wait=2):
     "Compare router JSON output"
 
     logger.info('Comparing router "%s" "%s" output', rname, command)
@@ -141,7 +141,7 @@ def router_compare_json_output(rname, command, reference, count=120, wait=0.5):
     filename = "{}/{}/{}".format(CWD, rname, reference)
     expected = json.loads(open(filename).read())
 
-    # Run test function until we get an result. Wait at most 60 seconds.
+    # Run test function until we get an result. Wait at most 80 seconds.
     test_func = partial(topotest.router_json_cmp, tgen.gears[rname], command, expected)
     _, diff = topotest.run_and_expect(test_func, None, count=count, wait=wait)
     assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)