From 2a779c3dc19c140c9f523ceedd3da644f26e6c6e Mon Sep 17 00:00:00 2001 From: Vitaly Gavensky Date: Tue, 21 May 2024 12:22:07 +0300 Subject: [PATCH] Fixes --- .github/workflows/pdr_plugin_ci_workflow.yml | 13 ++++++++++++- .../.pytest/run_pdr_standalone_pytest.sh | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pdr_plugin_ci_workflow.yml b/.github/workflows/pdr_plugin_ci_workflow.yml index 6b0b240df..cfdb01510 100644 --- a/.github/workflows/pdr_plugin_ci_workflow.yml +++ b/.github/workflows/pdr_plugin_ci_workflow.yml @@ -43,7 +43,12 @@ jobs: pytest -s $PDRPATH/tests/exclude_list_rest_api_tests.py --cov=$PDRPATH echo "Terminating standalone PDR process" sudo pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null - + sleep 10 + if pgrep -x "my_file.py" > /dev/null; then + echo "Failed to kill the process" + exit 1 + fi + - name: Run full simulation test timeout-minutes: 10 run: | @@ -52,3 +57,9 @@ jobs: python $PDRPATH/tests/simulation_telemetry.py echo "Terminating standalone PDR process" sudo pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null + sleep 10 + if pgrep -x "my_file.py" > /dev/null; then + echo "Failed to kill the process" + exit 1 + fi + \ No newline at end of file diff --git a/plugins/pdr_deterministic_plugin/.pytest/run_pdr_standalone_pytest.sh b/plugins/pdr_deterministic_plugin/.pytest/run_pdr_standalone_pytest.sh index 61f057cdd..f4406136d 100644 --- a/plugins/pdr_deterministic_plugin/.pytest/run_pdr_standalone_pytest.sh +++ b/plugins/pdr_deterministic_plugin/.pytest/run_pdr_standalone_pytest.sh @@ -20,6 +20,10 @@ sed -i -e 's/DEISOLATE_CONSIDER_TIME=5/DEISOLATE_CONSIDER_TIME=1/g' "$CONFIG_FIL echo "Terminating standalone PDR process" pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null sleep 10 +if pkill -0 isolation_algo.py; then + echo "Failed to kill the process." + exit 1 +fi echo "Starting standalone PDR process" python $PLUGIN_DIR/ufm_sim_web_service/isolation_algo.py >/dev/null 2>&1 &