diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-30 20:26:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 20:26:24 +0200 |
commit | 147c7a2de355c3733604474840902762b51062ae (patch) | |
tree | ea5a4ba9f844d8160c808d2755cd403f3c9fe89b /tests | |
parent | Merge pull request #13601 from opensourcerouting/build-yang-embed-20230525 (diff) | |
parent | lib, zebra: Ensure that the ifp->node exists (diff) | |
download | frr-147c7a2de355c3733604474840902762b51062ae.tar.xz frr-147c7a2de355c3733604474840902762b51062ae.zip |
Merge pull request #13631 from donaldsharp/fix_some_ping_issues
various issues
Diffstat (limited to 'tests')
-rw-r--r-- | tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py b/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py index 8058823ba..75e66566b 100644 --- a/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py +++ b/tests/topotests/bgp_default_originate/test_bgp_default_originate_2links.py @@ -26,6 +26,7 @@ from time import sleep from lib.topogen import Topogen, get_topogen from lib.topojson import build_config_from_json from lib.topolog import logger +from lib import topotest from lib.bgp import ( verify_bgp_convergence, @@ -1559,8 +1560,14 @@ def test_verify_default_originate_with_2way_ecmp_p2(request): step("Ping R1 configure IPv4 and IPv6 loopback address from R2") pingaddr = topo["routers"]["r1"]["links"]["lo"]["ipv4"].split("/")[0] router = tgen.gears["r2"] - output = router.run("ping -c 4 -w 4 {}".format(pingaddr)) - assert " 0% packet loss" in output, "Ping R1->R2 FAILED" + + def ping_router(): + output = router.run("ping -c 4 -w 4 {}".format(pingaddr)) + logger.info(output) + if " 0% packet loss" not in output: + return False + + _, res = topotest.run_and_expect(ping_router, None, count=10, wait=1) logger.info("Ping from R1 to R2 ... success") step("Shuting up the active route") |