Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix wrong dut was selected to stop themalctrld (#16162)
Description of PR Summary: Fixes wrong dut maybe selected to stop thermalctrl in chassis_fan tests. TestChassisFans::setup fixture will select the first DUT as the duthost to stop/start thermal control daemon. However, in the test case, it will enum_rand_one_per_hwsku_hostname to do the test. Therefore, we will see something like the following. that lc4 is being selected to stop thermalctld, but the test is running on supervisor. 16/12/2024 12:42:40 base._run L0071 DEBUG | /var/src/sonic-mgmt_xxx/tests/common/devices/sonic.py::stop_pmon_daemon_service#888: [xxx-lc4-1] AnsibleModule::shell, args=["docker exec pmon supervisorctl stop thermalctld"], kwargs={"module_ignore_errors": true} ...... 16/12/2024 12:42:54 __init__._log_sep_line L0170 INFO | ==================== platform_tests/api/test_chassis_fans.py::TestChassisFans::test_set_fans_speed[xxx-sup-1] call ==================== Approach What is the motivation for this PR? flaky test case in test_set_fans_speed How did you do it? use enum_rand_one_per_hwsku_hostname instead of duthost to align with the test case. How did you verify/test it? ran the test 3 times, all passed. co-authorized by: [email protected]
- Loading branch information