diff --git a/stackit/internal/wait/postgresflexalpha/wait.go b/stackit/internal/wait/postgresflexalpha/wait.go index c40b26af..976a3260 100644 --- a/stackit/internal/wait/postgresflexalpha/wait.go +++ b/stackit/internal/wait/postgresflexalpha/wait.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "math" + "math/rand/v2" "net/http" "time" @@ -141,7 +142,7 @@ func CreateInstanceWaitHandler( "failedCount": failedCount, }, ) - time.Sleep(5 * time.Second) + time.Sleep(time.Duration(rand.IntN(120)) * time.Second) //nolint:gosec // not that important and temporary return false, nil, nil } return true, s, fmt.Errorf( @@ -217,7 +218,7 @@ func PartialUpdateInstanceWaitHandler( "failedCount": failedCount, }, ) - time.Sleep(5 * time.Second) + time.Sleep(time.Duration(rand.IntN(120)) * time.Second) //nolint:gosec // not that important and temporary return false, nil, nil } return true, s, fmt.Errorf(