Skip to content

Commit

Permalink
[platform_tests] fix interfaces_wait_time not expected problem (sonic…
Browse files Browse the repository at this point in the history
…-net#11939)

Interfaces_wait_time can be a custom value, but in function the old value was used, because the function default value is initialized when custom value is applied. Fix the bug.
  • Loading branch information
Xichen96 authored Mar 12, 2024
1 parent e238067 commit d33618c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/platform_tests/test_reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def reboot_and_check(localhost, dut, interfaces, xcvr_skip_list,


def check_interfaces_and_services(dut, interfaces, xcvr_skip_list,
interfaces_wait_time=MAX_WAIT_TIME_FOR_INTERFACES, reboot_type=None):
interfaces_wait_time=None, reboot_type=None):
"""
Perform a further check after reboot-cause, including transceiver status, interface status
@param localhost: The Localhost object.
Expand All @@ -106,6 +106,9 @@ def check_interfaces_and_services(dut, interfaces, xcvr_skip_list,
logging.info("Wait until all critical services are fully started")
wait_critical_processes(dut)

if interfaces_wait_time is None:
interfaces_wait_time = MAX_WAIT_TIME_FOR_INTERFACES

if dut.is_supervisor_node():
logging.info("skipping interfaces related check for supervisor")
else:
Expand Down

0 comments on commit d33618c

Please sign in to comment.