Skip to content

Commit 031ee43

Browse files
committed
test: wireguard_multipoint: Add retries when check connectivity
Fix flaky behavior on some systems.
1 parent 19c8c80 commit 031ee43

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • test/case/interfaces/wireguard_multipoint

test/case/interfaces/wireguard_multipoint/test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -485,25 +485,25 @@ def configure_client2(dut):
485485
nsclient1.addroute("default", "2001:db8:3c4d:01::2", proto="ipv6")
486486

487487
with test.step("Verify IPv4 connectivity with ping 10.0.0.1, 10.0.0.2 and 10.0.0.3 from host:data1"):
488-
util.parallel(nsclient1.must_reach("10.0.0.1"),
489-
nsclient1.must_reach("10.0.0.2"),
490-
nsclient1.must_reach("10.0.0.3"))
488+
util.parallel(util.until(nsclient1.must_reach("10.0.0.1")),
489+
util.until(nsclient1.must_reach("10.0.0.2")),
490+
util.until(nsclient1.must_reach("10.0.0.3")))
491491

492492
with test.step("Verify IPv4 connectivity with ping 10.0.0.1 and 10.0.0.2 from host:data2"):
493-
util.parallel(nsserver.must_reach("10.0.0.1"),
494-
nsserver.must_reach("10.0.0.2"))
493+
util.parallel(util.until(nsserver.must_reach("10.0.0.1")),
494+
util.until(nsserver.must_reach("10.0.0.2")))
495495

496496
with test.step("Verify host:data2 can not ping 10.0.0.3"):
497497
nsserver.must_not_reach("10.0.0.3") # Not in allowed IPs
498498

499499
with test.step("Verify IPv6 connectivity with ping fd00:0::1, fd00:0::2 and fd00:0::3 from host:data1"):
500-
util.parallel(nsclient1.must_reach("fd00:0::1"),
501-
nsclient1.must_reach("fd00:0::2"),
502-
nsclient1.must_reach("fd00:0::3"))
500+
util.parallel(util.until(nsclient1.must_reach("fd00:0::1")),
501+
util.until(nsclient1.must_reach("fd00:0::2")),
502+
util.until(nsclient1.must_reach("fd00:0::3")))
503503

504504
with test.step("Verify IPv6 connectivity with ping fd00:0:1 and fd00:0:2 from host:data2"):
505-
util.parallel(nsserver.must_reach("fd00:0::1"),
506-
nsserver.must_reach("fd00:0::2"))
505+
util.parallel(util.until(nnsserver.must_reach("fd00:0::1")),
506+
util.until(nsserver.must_reach("fd00:0::2")))
507507

508508
with test.step("Verify host:data2 can not ping fd00:0::3"):
509509
nsserver.must_not_reach("fd00:0::3") # Not in allowed IPs

0 commit comments

Comments
 (0)