Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/bgp/test_bgp_update_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,21 @@ def common_setup_teardown(
),
)

# Clear TSA maintenance mode if active. On platforms with startup_tsa_tsb
# service enabled, config_reload (from setup_interfaces) restarts swss which
# triggers TSA with a 15-minute TSB timer. This causes test failures because
# the DUT only advertises loopback routes while in TSA mode.
# See: https://github.com/sonic-net/sonic-mgmt/issues/23336
tsa_status = duthost.shell("TSC", module_ignore_errors=True)['stdout']
if 'maintenance' in tsa_status.lower():
logging.info("DUT is in TSA maintenance mode, running TSB to clear it")
duthost.shell("TSB")
pytest_assert(
wait_until(60, 5, 0, lambda: 'maintenance' not in
duthost.shell("TSC", module_ignore_errors=True)['stdout'].lower()),
"DUT did not exit TSA maintenance mode after TSB"
)

yield bgp_neighbors, use_vtysh

# Cleanup suppress-fib-pending config
Expand Down
Loading