Skip to content
Merged
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
9 changes: 8 additions & 1 deletion tests/l2/test_l2_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import pytest
import tempfile

from pytest_ansible.errors import AnsibleConnectionFailure

from tests.common import config_reload
from tests.common.platform.processes_utils import wait_critical_processes
from tests.common.helpers.assertions import pytest_assert
Expand Down Expand Up @@ -175,7 +177,12 @@ def test_no_hardcoded_tables(duthosts, rand_one_dut_hostname, tbinfo):

# Remove minigraph to avoid config coming from minigraph.
duthost.shell("sudo rm {}".format(MINIGRAPH))
config_reload(duthost)
try:
config_reload(duthost)
except AnsibleConnectionFailure as e:
# In latest SONiC, config reload command will exit after mgmt interface restart
# Then 'duthost' will lost IPV4 connection and throw exception
logger.warning(f'Exception after config reload: {e}')
wait_critical_processes(duthost)
db_version_after = get_db_version(duthost)
logger.info(
Expand Down
Loading