Skip to content

Commit

Permalink
Fix test_reload_config issue: sonic-net#11654
Browse files Browse the repository at this point in the history
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080
2. Remove  wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason

Change-Id: Ifde0a83020bb06fb191a646e5ca91738b864ad7f
  • Loading branch information
JibinBao committed Feb 8, 2024
1 parent 233ad70 commit b2a757c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tests/platform_tests/test_reload_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging

import pytest
import re

from tests.common.fixtures.conn_graph_facts import conn_graph_facts # noqa F401
from tests.common.utilities import wait_until
Expand Down Expand Up @@ -125,9 +124,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
# we must give it a little longer or else it may falsely fail the test.
wait_until(360, 1, 0, check_database_status, duthost)

# Check if interfaces-config.service is exited
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)

logging.info("Reload configuration check")
out = duthost.shell("sudo config reload -y",
executable="/bin/bash", module_ignore_errors=True)
Expand All @@ -145,8 +141,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
logging.info("Checking config reload after system is up")
# Check if all database containers have started
wait_until(60, 1, 0, check_database_status, duthost)
# Check if interfaces-config.service is exited
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)
out = duthost.shell("sudo config reload -y",
executable="/bin/bash", module_ignore_errors=True)
assert "Retry later" in out['stdout']
Expand All @@ -170,11 +164,3 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
assert "Retry later" not in out['stdout']

assert wait_until(300, 20, 0, config_system_checks_passed, duthost, delayed_services)


def check_interfaces_config_service_status(duthost):
# check interfaces-config.service status
regx_interface_config_service_exit = r'.*Main PID: \d+ \(code=exited, status=0\/SUCCESS\).*'
interface_config_server_status = duthost.command(
'systemctl status interfaces-config.service', module_ignore_errors=True)['stdout']
return re.search(regx_interface_config_service_exit, interface_config_server_status)

0 comments on commit b2a757c

Please sign in to comment.