From 854bb5dbebbdf27e267d6cdbf670256741e9f44c Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Fri, 5 Aug 2022 17:09:20 +0100 Subject: [PATCH] fix: post-hoc testutil fix (#3391) --- testutil/eventually.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testutil/eventually.go b/testutil/eventually.go index d4f482abf1..fc0344f3bb 100644 --- a/testutil/eventually.go +++ b/testutil/eventually.go @@ -35,7 +35,9 @@ func Eventually(ctx context.Context, t testing.TB, condition func(context.Contex assert.NoError(t, ctx.Err(), "Eventually timed out") return false case <-tick: - assert.NoError(t, ctx.Err(), "Eventually timed out") + if !assert.NoError(t, ctx.Err(), "Eventually timed out") { + return false + } if condition(ctx) { return true }