From 4e398bc6c37cf251c278288b2ef3ad15ab9b1d33 Mon Sep 17 00:00:00 2001 From: Jianquan Ye Date: Sat, 28 Dec 2024 11:37:16 +1000 Subject: [PATCH] Add safe_reload and interface check for process monitoring and container check tests (#16252) Description of PR Summary: Notice quite a lot flaky failures on PR test, https://elastictest.org/scheduler/testplan/676e75562c6c7b8d3e3bd8bf?testcase=process_monitoring%2Ftest_critical_process_monitoring.py&type=console Simply wait for 120s is not enough for multi-asic kvm testbeds, enhance the config_reload to use safe_reload to make sure the testbed is healthy. Approach What is the motivation for this PR? Notice quite a lot flaky failures on PR test, https://elastictest.org/scheduler/testplan/676e75562c6c7b8d3e3bd8bf?testcase=process_monitoring%2Ftest_critical_process_monitoring.py&type=console How did you do it? Simply wait for 120s is not enough for multi-asic kvm testbeds, enhance the config_reload to use safe_reload to make sure the testbed is healthy. How did you verify/test it? PR test will verify it. authorized by: jianquanye@microsoft.com --- tests/container_checker/test_container_checker.py | 2 +- tests/process_monitoring/test_critical_process_monitoring.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/container_checker/test_container_checker.py b/tests/container_checker/test_container_checker.py index 267baaa6d34..a09f19752b3 100644 --- a/tests/container_checker/test_container_checker.py +++ b/tests/container_checker/test_container_checker.py @@ -49,7 +49,7 @@ def config_reload_after_tests(duthosts, selected_rand_one_per_hwsku_hostname): for hostname in selected_rand_one_per_hwsku_hostname: duthost = duthosts[hostname] logger.info("Reload config on DuT '{}' ...".format(duthost.hostname)) - config_reload(duthost) + config_reload(duthost, safe_reload=True, check_intf_up_ports=True, wait_for_bgp=True) postcheck_critical_processes_status(duthost, up_bgp_neighbors[duthost]) diff --git a/tests/process_monitoring/test_critical_process_monitoring.py b/tests/process_monitoring/test_critical_process_monitoring.py index 3be0b3191da..3f47354373a 100755 --- a/tests/process_monitoring/test_critical_process_monitoring.py +++ b/tests/process_monitoring/test_critical_process_monitoring.py @@ -37,7 +37,7 @@ def config_reload_after_tests(duthosts, rand_one_dut_hostname): duthost = duthosts[rand_one_dut_hostname] yield - config_reload(duthost) + config_reload(duthost, safe_reload=True, check_intf_up_ports=True, wait_for_bgp=True) @pytest.fixture(autouse=True, scope='module')