Skip to content

Commit bdc6aac

Browse files
JibinBaomssonicbld
authored andcommitted
Fix test_reload_config issue: #11654 (#11674)
1. Revert PR: #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: #7953 due to the above same reason
1 parent a1da7c9 commit bdc6aac

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

tests/platform_tests/test_reload_config.py

-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import logging
88

99
import pytest
10-
import re
1110

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

128-
# Check if interfaces-config.service is exited
129-
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)
130-
131127
logging.info("Reload configuration check")
132128
out = duthost.shell("sudo config reload -y",
133129
executable="/bin/bash", module_ignore_errors=True)
@@ -145,8 +141,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
145141
logging.info("Checking config reload after system is up")
146142
# Check if all database containers have started
147143
wait_until(60, 1, 0, check_database_status, duthost)
148-
# Check if interfaces-config.service is exited
149-
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)
150144
out = duthost.shell("sudo config reload -y",
151145
executable="/bin/bash", module_ignore_errors=True)
152146
assert "Retry later" in out['stdout']
@@ -170,11 +164,3 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
170164
assert "Retry later" not in out['stdout']
171165

172166
assert wait_until(300, 20, 0, config_system_checks_passed, duthost, delayed_services)
173-
174-
175-
def check_interfaces_config_service_status(duthost):
176-
# check interfaces-config.service status
177-
regx_interface_config_service_exit = r'.*Main PID: \d+ \(code=exited, status=0\/SUCCESS\).*'
178-
interface_config_server_status = duthost.command(
179-
'systemctl status interfaces-config.service', module_ignore_errors=True)['stdout']
180-
return re.search(regx_interface_config_service_exit, interface_config_server_status)

0 commit comments

Comments
 (0)