From 7bef7ae20c92488b47a197bc8d8abb93af54a7dd Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Fri, 5 Aug 2022 15:57:32 +0000 Subject: [PATCH] fix: post-hoc testutil fix --- testutil/eventually.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testutil/eventually.go b/testutil/eventually.go index d4f482abf1608..fc0344f3bb78e 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 }