Skip to content

Commit 2207931

Browse files
ccroy-aristamssonicbld
authored andcommitted
Replace immediate daemon running check in PSU status tests with a wait loop to provide some flexibility in the amount of time it takes for the daemons to go from STARTING state to RUNNING. (sonic-net#12047)
1 parent 3252231 commit 2207931

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/platform_tests/cli/test_show_platform.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_show_platform_psustatus(duthosts, enum_supervisor_dut_hostname):
231231
duthost = duthosts[enum_supervisor_dut_hostname]
232232
logging.info("Check pmon daemon status on dut '{}'".format(duthost.hostname))
233233
pytest_assert(
234-
check_pmon_daemon_status(duthost),
234+
wait_until(60, 5, 0, check_pmon_daemon_status, duthost),
235235
"Not all pmon daemons running on '{}'".format(duthost.hostname)
236236
)
237237
cmd = " ".join([CMD_SHOW_PLATFORM, "psustatus"])
@@ -264,7 +264,9 @@ def test_show_platform_psustatus_json(duthosts, enum_supervisor_dut_hostname):
264264
pytest.skip("JSON output not available in this version")
265265

266266
logging.info("Check pmon daemon status")
267-
pytest_assert(check_pmon_daemon_status(duthost), "Not all pmon daemons running.")
267+
pytest_assert(
268+
wait_until(60, 5, 0, check_pmon_daemon_status, duthost),
269+
"Not all pmon daemons running.")
268270

269271
cmd = " ".join([CMD_SHOW_PLATFORM, "psustatus", "--json"])
270272

0 commit comments

Comments
 (0)