]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: add time to ldp vpls testcase
authorMark Stapp <mjs@voltanet.io>
Tue, 11 Aug 2020 13:33:39 +0000 (09:33 -0400)
committerMark Stapp <mjs@voltanet.io>
Tue, 11 Aug 2020 13:33:39 +0000 (09:33 -0400)
Add some more wait time to an LDP vpls testcase - it seems to have
trouble in the CI sometimes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py

index 600d640a700ba185b8bc08e1df6a96cca332ea08..a1662dc411a3f710cc45a15bfe2b71c8d692e459 100755 (executable)
@@ -154,7 +154,7 @@ def teardown_module(mod):
     tgen.stop_topology()
 
 
-def router_compare_json_output(rname, command, reference):
+def router_compare_json_output(rname, command, reference, count=80, wait=1):
     "Compare router JSON output"
 
     logger.info('Comparing router "%s" "%s" output', rname, command)
@@ -163,9 +163,9 @@ def router_compare_json_output(rname, command, reference):
     filename = "{}/{}/{}".format(CWD, rname, reference)
     expected = json.loads(open(filename).read())
 
-    # Run test function until we get an result. Wait at most 80 seconds.
+    # Run test function until we get an result.
     test_func = partial(topotest.router_json_cmp, tgen.gears[rname], command, expected)
-    _, diff = topotest.run_and_expect(test_func, None, count=160, wait=0.5)
+    _, diff = topotest.run_and_expect(test_func, None, count, wait)
     assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)
     assert diff is None, assertmsg
 
@@ -279,10 +279,12 @@ def test_ldp_pseudowires_after_link_down():
     tgen.gears["r1"].peer_link_enable("r1-eth1", False)
     topotest.sleep(5, "Waiting for the network to reconverge")
 
-    # check if the pseudowire is still up (using an alternate path for nexthop resolution)
+    # check if the pseudowire is still up (using an alternate path
+    # for nexthop resolution). Give some extra wait time.
     for rname in ["r1", "r2", "r3"]:
         router_compare_json_output(
-            rname, "show l2vpn atom vc json", "show_l2vpn_vc.ref"
+            rname, "show l2vpn atom vc json", "show_l2vpn_vc.ref",
+            count=160, wait=1
         )