fix: post-hoc testutil fix (#3391)

This commit is contained in:
Cian Johnston 2022-08-05 17:09:20 +01:00 committed by GitHub
parent e7bc01383c
commit 854bb5dbeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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
}