From 8824e302bf94de7e96a415d309cf68a793838395 Mon Sep 17 00:00:00 2001 From: Kuldeep Kashyap Date: Wed, 20 Sep 2023 04:21:53 +0000 Subject: [PATCH] tests: Fix for issue when RP is changed Issue: https://github.com/FRRouting/frr/issues/14057 Fix: Added some sleep to make sure prune is received before RP is changed. Signed-off-by: Kuldeep Kashyap --- .../test_multicast_pim_uplink_topo2.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/topotests/multicast_pim_uplink_topo2/test_multicast_pim_uplink_topo2.py b/tests/topotests/multicast_pim_uplink_topo2/test_multicast_pim_uplink_topo2.py index 4be0c199a2ee..1fb81c0d7091 100644 --- a/tests/topotests/multicast_pim_uplink_topo2/test_multicast_pim_uplink_topo2.py +++ b/tests/topotests/multicast_pim_uplink_topo2/test_multicast_pim_uplink_topo2.py @@ -23,6 +23,7 @@ import sys import time import pytest +from time import sleep # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -430,7 +431,15 @@ def test_iif_oil_when_RP_address_changes_from_static_to_BSR_p1(request): } ] } - }, + } + } + result = create_pim_config(tgen, topo, input_dict) + assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result) + + # Need to wait for 10 sec to make sure prune is received before below RP change is executed + sleep(10) + + input_dict = { "r5": { "pim": { "rp": [ @@ -444,7 +453,6 @@ def test_iif_oil_when_RP_address_changes_from_static_to_BSR_p1(request): } }, } - result = create_pim_config(tgen, topo, input_dict) assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result)