summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2021-11-05 20:50:02 +0100
committerGitHub <noreply@github.com>2021-11-05 20:50:02 +0100
commit3e57d691869234b8b9e1873f330f8b81a6b1f2bf (patch)
treeff3c49f3220b166d3f7bc9aec9e32bdb9523a53f
parentMerge pull request #9975 from donaldsharp/pim_basic_timings (diff)
parenttests: Ensure ospf has reconverged before continuing (diff)
downloadfrr-3e57d691869234b8b9e1873f330f8b81a6b1f2bf.tar.xz
frr-3e57d691869234b8b9e1873f330f8b81a6b1f2bf.zip
Merge pull request #9974 from donaldsharp/ldp_vpls_topo1_wait
tests: Ensure ospf has reconverged before continuing
-rw-r--r--tests/topotests/ldp_vpls_topo1/r1/show_ip_route_after_link_down.ref20
-rw-r--r--tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py12
2 files changed, 29 insertions, 3 deletions
diff --git a/tests/topotests/ldp_vpls_topo1/r1/show_ip_route_after_link_down.ref b/tests/topotests/ldp_vpls_topo1/r1/show_ip_route_after_link_down.ref
new file mode 100644
index 000000000..84113a038
--- /dev/null
+++ b/tests/topotests/ldp_vpls_topo1/r1/show_ip_route_after_link_down.ref
@@ -0,0 +1,20 @@
+{
+ "2.2.2.2/32":[
+ {
+ "prefix":"2.2.2.2/32",
+ "protocol":"ospf",
+ "selected":true,
+ "distance":110,
+ "metric":20,
+ "nexthops":[
+ {
+ "fib":true,
+ "ip":"10.0.2.3",
+ "afi":"ipv4",
+ "interfaceName":"r1-eth2",
+ "active":true
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py b/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py
index 86128a629..8a41ea510 100644
--- a/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py
+++ b/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py
@@ -272,9 +272,15 @@ def test_ldp_pseudowires_after_link_down():
# Shut down r1-r2 link */
tgen = get_topogen()
- tgen.gears["r1"].peer_link_enable("r1-eth1", False)
- topotest.sleep(5, "Waiting for the network to reconverge")
-
+ rname = "r1"
+ tgen.gears[rname].peer_link_enable("r1-eth1", False)
+ router_compare_json_output(
+ rname,
+ "show ip route json",
+ "show_ip_route_after_link_down.ref",
+ count=160,
+ wait=1,
+ )
# 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"]: