diff --git a/helper/common/common_test.go b/helper/common/common_test.go index 0d1799916a..6a7af9e4e4 100644 --- a/helper/common/common_test.go +++ b/helper/common/common_test.go @@ -117,7 +117,7 @@ func TestRetryForever_AlwaysReturnError_ShouldNeverEnd(t *testing.T) { } func TestRetryForever_ReturnNilAfterFirstRun_ShouldEnd(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) RetryForever(ctx, time.Millisecond*100, func(ctx context.Context) error { select { case <-ctx.Done():