Merge pull request #9923 from BbolroC/increase-interval-max-tries-kubectl

tests: Increase interval and max_tries for kubectl_retry
This commit is contained in:
Zvonko Kaiser 2024-06-27 09:49:24 +02:00 committed by GitHub
commit 29bb9de864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,11 +81,11 @@ function handle_error() {
trap 'handle_error $LINENO' ERR
# A wrapper function for kubectl with retry logic
# runs the command up to 3 times with a 5-second interval
# runs the command up to 5 times with a 15-second interval
# to ensure successful execution
function kubectl_retry() {
local max_tries=3
local interval=5
local max_tries=5
local interval=15
local i=0
while true; do
kubectl $@ && return 0 || true