Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/pfcwd/test_pfcwd_all_port_storm.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,13 @@ def run_test(self, duthost, storm_hndle, expect_regex, syslog_marker, action, se
port_type = "ports" if action == "storm" else "stormed ports"
logger.info(f"Waiting for {threshold}% of {port_type} to reach {action} state")

timeout = 60
# Increase the timeout for LT2/FT2 topo as the pfc_gen script takes
# longer time to generate storm on all ports
# Scale timeout with port count to allow sufficient time on high port-count platforms.
num_ports = len(stormed_ports_list) if stormed_ports_list else len(selected_test_ports)
timeout = max(60, num_ports * 2)
# LT2/FT2 topologies need at least 120s because the traffic generator
# takes longer to spin up on those setups.
if tbinfo and tbinfo['topo']['type'] in ["lt2", "ft2"]:
timeout = 120
timeout = max(timeout, 120)
pytest_assert(
wait_until(timeout, 2, 5, verify_all_ports_pfc_storm_in_expected_state, duthost,
storm_hndle, action, selected_test_ports, baseline_counters, threshold,
Expand Down
Loading