sonic-mgmt
sonic-mgmt copied to clipboard
[platform][cli] PSU Status Tests: Permit Daemons Some Time to enter RUNNING State
Description of PR
This patch adds a 60-second window to the psustatus tests to allow time for the relevant daemons to reach the RUNNING state, should they be found in the STARTING state when the daemon status check occurs.
Summary: Fixes # (issue)
Type of change
- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] Test case(new/improvement)
Back port request
- [ ] 201911
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [x] 202311
Approach
What is the motivation for this PR?
Encountered an instance where the psustatus tests failed because the pmon daemon status check caught the applicable daemons in the STARTING state as opposed to the RUNNING state. This was seen one time; despite a few dozen attempts, have not been able to recreate the issue. This change will help guard against such potential race conditions.
How did you do it?
Added a 60 second wait (5 second interval, 0 delay) on check_pmon_daemon_status in each of the psustatus tests.
How did you verify/test it?
Ran the tests with the fixes applied and they passed.
@prgeor could you help to review?
hi @ccroy-arista could you help to test with 202311 branch so we can do the cherry pick to avoid regression.
Hi @StormLiangMS, the changes were tested against 202311 at the time (March 15); 10 iterations were run to establish confidence (all passed).
Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-mgmt/pull/12513