Skip to content

Commit

Permalink
Fix flaky test_reload_configuration_checks when all processes are not…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
tudupa authored and mssonicbld committed Aug 28, 2024
1 parent ce385f3 commit dcc3565
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/platform_tests/test_reload_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dcc3565

Please sign in to comment.