diff --git a/tests/common.sh b/tests/common.sh index 8bcaed0c..d60aad56 100755 --- a/tests/common.sh +++ b/tests/common.sh @@ -157,8 +157,9 @@ wait_for_pod_exec() { # $3 = max. retries (default: 10) max_retries=$([[ -n "$3" ]] && echo "$3" || echo "10") for (( i=0; i<=max_retries; i++ )); do - echo "Try #$i" + echo "Try #$i: 'kubectl exec $1 -- $2'" kubectl exec "$1" -- $2 && return 0 + sleep 1 done echo "Command '$2' in pod '$1' did NOT return successfully in $max_retries tries" return 1 diff --git a/tests/test_full_lifecycle.sh b/tests/test_full_lifecycle.sh index bb5eca1c..561b0b47 100755 --- a/tests/test_full_lifecycle.sh +++ b/tests/test_full_lifecycle.sh @@ -64,7 +64,7 @@ sleep 5 # 6. test host.k3d.internal info "Checking DNS Lookup for host.k3d.internal" -wait_for_pod_exec "testimage" "nslookup host.k3d.internal" 6 +wait_for_pod_exec "testimage" "nslookup host.k3d.internal" 10 # Cleanup