From 414bbb2b0f1b99a416a0ecc730f6d61c6f8475a3 Mon Sep 17 00:00:00 2001 From: Matej Kralik Date: Fri, 11 Oct 2024 14:13:03 +0200 Subject: [PATCH] [OSSM-8243] Fail test execution when UntilSuccess reaches max attempt (#751) --- pkg/util/retry/retry.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/util/retry/retry.go b/pkg/util/retry/retry.go index ff60b795..73c55fc6 100644 --- a/pkg/util/retry/retry.go +++ b/pkg/util/retry/retry.go @@ -45,6 +45,7 @@ func UntilSuccessWithOptions(t test.TestHelper, options RetryOptions, f func(t t if options.logAttempts && env.IsLogFailedRetryAttempts() { t.Logf("Last attempt (%d/%d) failed.", i+1, options.maxAttempts) } + t.T().FailNow() } else { if options.logAttempts && env.IsLogFailedRetryAttempts() { if options.delayBetweenAttempts == defaultOptions.delayBetweenAttempts {