tests/e2e: add wait time between exec tries
This commit is contained in:
parent
dc725fcdbc
commit
6708515125
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user