Skip to content

Commit a2cbd9c

Browse files
committed
Add traffic retry to override the virtual environment stability issue
Add traffic retry in everflow multi binding acl case to override the virtual environment stability issue Change-Id: I825ee8981d59a3692384106df62a135b5506660f Signed-off-by: echuawu <[email protected]>
1 parent 94a64df commit a2cbd9c

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

tests/everflow/test_everflow_testbed.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import ptf.packet as scapy
1515
from tests.ptf_runner import ptf_runner
1616
from .everflow_test_utilities import TARGET_SERVER_IP, BaseEverflowTest, DOWN_STREAM, UP_STREAM, DEFAULT_SERVER_IP
17+
from retry.api import retry_call
1718
# Module-level fixtures
1819
from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory # noqa: F401
1920
from tests.common.fixtures.ptfhost_utils import copy_acstests_directory # noqa: F401
@@ -239,15 +240,26 @@ def test_everflow_multi_binding_acl(self, setup_info, setup_mirror_session,
239240
random_upstream_intf = random.choice(list(upstream_links_for_unselected_dut.keys()))
240241
rx_port_ptf_id = upstream_links_for_unselected_dut[random_upstream_intf]["ptf_port_id"]
241242
tx_port_ptf_id = setup_info[dest_port_type]["dest_port_ptf_id"][0]
242-
self._run_everflow_test_scenarios(
243-
ptfadapter,
244-
setup_info,
245-
setup_mirror_session,
246-
everflow_dut,
247-
rx_port_ptf_id,
248-
[tx_port_ptf_id],
249-
dest_port_type,
250-
multi_binding_acl=True
243+
# Adding retries is required by MSFT to overcome the issue of random packet loss on their simulator
244+
retry_call(
245+
self._run_everflow_test_scenarios,
246+
fargs=(
247+
ptfadapter,
248+
setup_info,
249+
mux_config,
250+
setup_mirror_session,
251+
everflow_dut,
252+
rx_port_ptf_id,
253+
[tx_port_ptf_id],
254+
dest_port_type
255+
),
256+
fkwargs={
257+
'multi_binding_acl': True
258+
},
259+
exceptions=Exception,
260+
tries=5,
261+
delay=10,
262+
logger=logger
251263
)
252264

253265
def test_everflow_basic_forwarding(self, setup_info, setup_mirror_session, # noqa F811

0 commit comments

Comments
 (0)