Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:15573] sonic-mgmt: fix port toggle timeout on many ports #15673

Merged
merged 1 commit into from
Nov 21, 2024
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
6 changes: 4 additions & 2 deletions tests/common/port_toggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,16 @@ def default_port_toggle_wait_time(duthost, port_count):
port_down_wait_time, port_up_wait_time = 120, 180
asic_type = duthost.facts["asic_type"]

if asic_type == "mellanox":
is_modular_chassis = duthost.get_facts().get("modular_chassis")

if (asic_type == "mellanox") or (asic_type == "broadcom" and not is_modular_chassis):
if port_count <= BASE_PORT_COUNT:
port_count = BASE_PORT_COUNT

port_count_factor = port_count / BASE_PORT_COUNT
port_down_wait_time = int(port_down_wait_time * port_count_factor)
port_up_wait_time = int(port_up_wait_time * port_count_factor)
elif duthost.get_facts().get("modular_chassis"):
elif is_modular_chassis:
port_down_wait_time = 300
port_up_wait_time = 300

Expand Down
Loading