Skip to content

Commit

Permalink
[sonic-mgmt] Fix "dualtor/test_orchagent_standby_tor_downstream.py"
Browse files Browse the repository at this point in the history
Fixes include:
1) Make log_analyzer to ignore "SAI_API_TUNNEL:_brcm_sai_mptnl_*" log messages,
   similar to other tests done as part of PR#14199.
2) Increase wait time for expected route to be populated after bgp
   restart.
  • Loading branch information
vkjammala-arista committed Nov 13, 2024
1 parent 48b6c08 commit 95162cc
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/dualtor/test_orchagent_standby_tor_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@
logger = logging.getLogger(__file__)


@pytest.fixture(autouse=True)
def ignore_expected_loganalyzer_exception(loganalyzer, duthosts):

ignore_errors = [
r".* ERR syncd#syncd: .*SAI_API_TUNNEL:_brcm_sai_mptnl_tnl_route_event_add:\d+ ecmp table entry lookup "
"failed with error.*",
r".* ERR syncd#syncd: .*SAI_API_TUNNEL:_brcm_sai_mptnl_process_route_add_mode_default_and_host:\d+ "
"_brcm_sai_mptnl_tnl_route_event_add failed with error.*"
]

if loganalyzer:
for duthost in duthosts:
loganalyzer[duthost.hostname].ignore_regex.extend(ignore_errors)

return None


@pytest.fixture(params=['ipv4', 'ipv6'])
def ip_version(request):
"""Traffic IP version to test."""
Expand Down Expand Up @@ -262,7 +279,7 @@ def test_standby_tor_downstream_loopback_route_readded(
rand_unselected_dut.shell("config bgp start all")
pt_assert(
wait_until(
10, 1, 0,
60, 1, 0,
lambda: route_matches_expected_state(rand_selected_dut, active_tor_loopback0, expect_route=True)),
"Expected route {} not found on {}".format(active_tor_loopback0, rand_selected_dut)
)
Expand Down

0 comments on commit 95162cc

Please sign in to comment.