Skip to content

Commit 2edf5b1

Browse files
[platform/api/test_module]: Increase timeout for test_reboot for t2 (sonic-net#17382)
What is the motivation for this PR? Test is failing because it is not waiting long enough after reboot How did you do it? How did you verify/test it? ran on arista t2 chassis Any platform specific information? t2 Signed-off-by: Liam Kearney <liamkearney@microsoft.com>
1 parent afe83b9 commit 2edf5b1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/platform_tests/api/conftest.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ def stop_platform_api_service(duthosts):
2222
# Check if platform_api_server running in the pmon docker and only then stop it. Else we would fail,
2323
# and not stop on other DUT's
2424
out = duthost.shell('docker exec pmon supervisorctl status platform_api_server',
25-
module_ignore_errors=True)['stdout_lines']
26-
platform_api_service_state = [line.strip().split()[1] for line in out][0]
25+
module_ignore_errors=True)
26+
27+
# ensure pmon is still up
28+
if out.get('stderr_lines') and "Error response from daemon" in out['stderr_lines']:
29+
pytest.fail(f"pmon is not running after tests {out['stderr_lines']}")
30+
31+
platform_api_service_state = [line.strip().split()[1] for line in out['stdout_lines']][0]
2732
if platform_api_service_state == 'RUNNING':
2833
duthost.command('docker exec -i pmon supervisorctl stop platform_api_server')
2934
duthost.command('docker exec -i pmon rm -f {}'.format(pmon_path_supervisor))

tests/platform_tests/api/test_module.py

+3
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ def test_reboot(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, pla
488488
reboot_type = 'default'
489489
reboot_timeout = 300
490490

491+
if duthosts[enum_rand_one_per_hwsku_hostname].get_facts().get("modular_chassis"):
492+
reboot_timeout = 360
493+
491494
# Extend ignore fabric port msgs for T2 chassis with DNX chipset on Linecards
492495
ignore_t2_syslog_msgs(duthosts[enum_rand_one_per_hwsku_hostname])
493496

0 commit comments

Comments
 (0)