Skip to content

Commit a6cf129

Browse files
authored
Fix test_reload_config issue: #11654 (#11675)
Cherry-pick #11674 to 202205 branch 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 3fbd841 commit a6cf129

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

tests/platform_tests/test_reload_config.py

Lines changed: 0 additions & 14 deletions
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
1312
from tests.common.utilities import wait_until
@@ -94,9 +93,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
9493
# we must give it a little longer or else it may falsely fail the test.
9594
wait_until(360, 1, 0, check_database_status, duthost)
9695

97-
# Check if interfaces-config.service is exited
98-
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)
99-
10096
logging.info("Reload configuration check")
10197
out = duthost.shell("sudo config reload -y", executable="/bin/bash", module_ignore_errors=True)
10298
# config reload command shouldn't work immediately after system reboot
@@ -112,8 +108,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
112108
logging.info("Checking config reload after system is up")
113109
# Check if all database containers have started
114110
wait_until(60, 1, 0, check_database_status, duthost)
115-
# Check if interfaces-config.service is exited
116-
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)
117111
out = duthost.shell("sudo config reload -y", executable="/bin/bash", module_ignore_errors=True)
118112
assert "Retry later" in out['stdout']
119113
assert wait_until(300, 20, 0, config_system_checks_passed, duthost)
@@ -135,11 +129,3 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
135129
assert "Retry later" not in out['stdout']
136130

137131
assert wait_until(300, 20, 0, config_system_checks_passed, duthost)
138-
139-
140-
def check_interfaces_config_service_status(duthost):
141-
# check interfaces-config.service status
142-
regx_interface_config_service_exit = r'.*Main PID: \d+ \(code=exited, status=0\/SUCCESS\).*'
143-
interface_config_server_status = duthost.command(
144-
'systemctl status interfaces-config.service', module_ignore_errors=True)['stdout']
145-
return re.search(regx_interface_config_service_exit, interface_config_server_status)

0 commit comments

Comments
 (0)