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:15526] fix flaky tests/autorestart/test_container_autorestart.py #15574

Merged
merged 1 commit into from
Nov 15, 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
8 changes: 6 additions & 2 deletions tests/autorestart/test_container_autorestart.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
DHCP_SERVER = "dhcp_server"
POST_CHECK_INTERVAL_SECS = 1
POST_CHECK_THRESHOLD_SECS = 360
POST_CHECK_THRESHOLD_SECS_T2 = 600
PROGRAM_STATUS = "RUNNING"


Expand Down Expand Up @@ -459,13 +460,16 @@ def postcheck_critical_processes_status(duthost, feature_autorestart_states, up_
if is_hiting_start_limit(duthost, feature_name):
clear_failed_flag_and_restart(duthost, feature_name, feature_name)

post_check_threshold = POST_CHECK_THRESHOLD_SECS_T2 if duthost.get_facts().get("modular_chassis") \
else POST_CHECK_THRESHOLD_SECS

critical_proceses = wait_until(
POST_CHECK_THRESHOLD_SECS, POST_CHECK_INTERVAL_SECS, 0,
post_check_threshold, POST_CHECK_INTERVAL_SECS, 0,
check_all_critical_processes_status, duthost
)

bgp_check = wait_until(
POST_CHECK_THRESHOLD_SECS, POST_CHECK_INTERVAL_SECS, 0,
post_check_threshold, POST_CHECK_INTERVAL_SECS, 0,
duthost.check_bgp_session_state_all_asics, up_bgp_neighbors, "established"
)

Expand Down
Loading