Skip to content

Commit a7143de

Browse files
committed
Increase maximum wait time, handle minigraph reloads, and use pytest_assert
Signed-off-by: Saikrishna Arcot <[email protected]>
1 parent bd9e4aa commit a7143de

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/common/config_reload.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ def config_reload(duthost, config_source='config_db', wait=120, start_bgp=True,
8080
wait = max(wait, 240) if modular_chassis else wait
8181

8282
if safe_reload:
83-
assert wait_until(wait, 20, 0, duthost.critical_services_fully_started), \
84-
"All critical services should be fully started!"
83+
# The wait time passed in might not be guaranteed to cover the actual
84+
# time it takes for containers to come back up. Therefore, add 5
85+
# minutes to the maximum wait time. If it's ready sooner, then the
86+
# function will return sooner.
87+
pytest_assert(wait_until(wait + 300, 20, 0, duthost.critical_services_fully_started),
88+
"All critical services should be fully started!")
89+
if config_source == 'minigraph':
90+
pytest_assert(wait_until(300, 20, 0, chk_for_pfc_wd, duthost),
91+
"PFC_WD is missing in CONFIG-DB")
8592
else:
8693
time.sleep(wait)

0 commit comments

Comments
 (0)