From dcc3565dfd52996c9199cbd15fd9e326793ebc01 Mon Sep 17 00:00:00 2001 From: TANMAYA UDUPA <143127557+tudupa@users.noreply.github.com> Date: Wed, 28 Aug 2024 00:37:38 -0400 Subject: [PATCH] Fix flaky test_reload_configuration_checks when all processes are not up during swss stop job (#14218) What is the motivation for this PR? The testcase test_reload_configuration_checks fails sometimes when swss is stopped after a config reload and some of the critical processes are still coming up. The stop job of swss in the queue is cancelled due to other critical processes still coming up and trying to bring up swss. Hence, we get the error - "Job for swss.service cancelled" How did you do it? This PR enhanced the testcase to wait until all the critical processes are up after a config reload and then execute a stop job for swss. How did you verify/test it? Ran the testcase 15-20 times to see if it fails. --- tests/platform_tests/test_reload_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/platform_tests/test_reload_config.py b/tests/platform_tests/test_reload_config.py index 0d98c6f22e0..2a83bfde62b 100644 --- a/tests/platform_tests/test_reload_config.py +++ b/tests/platform_tests/test_reload_config.py @@ -176,7 +176,8 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname, result, out = execute_config_reload_cmd(duthost, config_reload_timeout) assert result and "Retry later" in out['stdout'] assert wait_until(300, 20, 0, config_system_checks_passed, duthost, delayed_services) - + # Wait untill all critical processes come up so that it doesnt interfere with swss stop job + wait_critical_processes(duthost) logging.info("Stopping swss docker and checking config reload") if duthost.is_multi_asic: for asic in duthost.asics: