From ece0f9690e0372f1b6469b46637aa441bdd1a65e Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Thu, 10 Oct 2024 22:29:04 +0000 Subject: [PATCH] tests: k8s-inotify: longer pod termination timeout inotify-configmap-pod.yaml is using: "inotifywait --timeout 120", so wait for up to 180 seconds for the pod termination to be reported. Hopefully, some of the sporadic errors from #10413 will be avoided this way: not ok 1 configmap update works, and preserves symlinks waitForProcess "${wait_time}" "$sleep_time" "${command}" failed Signed-off-by: Dan Mihai --- tests/integration/kubernetes/k8s-inotify.bats | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration/kubernetes/k8s-inotify.bats b/tests/integration/kubernetes/k8s-inotify.bats index 8acc3678ef..c2a761d46d 100644 --- a/tests/integration/kubernetes/k8s-inotify.bats +++ b/tests/integration/kubernetes/k8s-inotify.bats @@ -32,10 +32,14 @@ setup() { # Update configmap kubectl apply -f "${pod_config_dir}"/inotify-updated-configmap.yaml + # inotify-configmap-pod.yaml is using: "inotifywait --timeout 120", so wait for + # up to 180 seconds for the pod termination to be reported. + pod_termination_wait_time=180 + # Wait for the pod to complete command="kubectl describe pod ${pod_name} | grep \"State: \+Terminated\"" - info "Waiting ${wait_time} seconds for: ${command}" - waitForProcess "${wait_time}" "$sleep_time" "${command}" + info "Waiting ${pod_termination_wait_time} seconds for: ${command}" + waitForProcess "${pod_termination_wait_time}" "$sleep_time" "${command}" # Verify we saw the update result=$(kubectl get pod "$pod_name" --output="jsonpath={.status.containerStatuses[]}")