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 }