Skip to content

Commit 852aefd

Browse files
Fix laganalyzer error in test_iface_namingmode (sonic-net#16073)
Similar issue to sonic-net#12174 in that counters stats continue to be polled in an unstable state. In the test_iface_namingmode.py case, TestConfigInterface resets the interface configurations at the end, and these syslog errors only appear after the test begins the teardown process. Adding a loganalyzer ignore for this message to this test to fix.
1 parent c434f84 commit 852aefd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/iface_namingmode/test_iface_namingmode.py

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ def skip_test_for_multi_asic(duthosts, enum_rand_one_per_hwsku_frontend_hostname
2626
pytest.skip('CLI command not supported')
2727

2828

29+
@pytest.fixture(autouse=True)
30+
def ignore_expected_loganalyzer_exception(duthosts, enum_rand_one_per_hwsku_frontend_hostname, loganalyzer):
31+
if loganalyzer:
32+
ignore_regex_list = [
33+
".* ERR syncd#syncd: :- collectData: Failed to get stats of Port Counter.*"
34+
]
35+
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
36+
loganalyzer[duthost.hostname].ignore_regex.extend(ignore_regex_list)
37+
38+
2939
@pytest.fixture(scope='module', autouse=True)
3040
def setup(duthosts, enum_rand_one_per_hwsku_frontend_hostname, tbinfo):
3141
"""

0 commit comments

Comments
 (0)