From a96050a7ad6ea18b7a326810d2b4a2bd6a8ce510 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 8 Sep 2023 16:44:22 +0200 Subject: [PATCH] tests: Apply timeout to 'ctr t kill' This task has been observed to hang at times. Signed-off-by: Jeremi Piotrowski --- tests/common.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.bash b/tests/common.bash index 08b82601bf..fc0ed0a7f9 100644 --- a/tests/common.bash +++ b/tests/common.bash @@ -158,7 +158,7 @@ function clean_env_ctr() info "Wait until the containers gets removed" for task_id in "${running_tasks[@]}"; do - sudo ctr t kill -a -s SIGTERM ${task_id} >/dev/null 2>&1 + sudo timeout -s SIGKILL 30s ctr t kill -a -s SIGTERM ${task_id} >/dev/null 2>&1 || true sleep 0.5 done