EventuallyWithT asserts that given condition will be met in waitFor time, periodically checking target function each tick. In contrast to Eventually, it supplies a CollectT to the condition function, so that the condition function can use the CollectT to call other assertions. The condition is consi
(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{})
| 434 | // require.True(c, externalValue, "expected 'externalValue' to be true") |
| 435 | // }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") |
| 436 | func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { |
| 437 | if h, ok := t.(tHelper); ok { |
| 438 | h.Helper() |
| 439 | } |
| 440 | if assert.EventuallyWithT(t, condition, waitFor, tick, msgAndArgs...) { |
| 441 | return |
| 442 | } |
| 443 | t.FailNow() |
| 444 | } |
| 445 | |
| 446 | // EventuallyWithTf asserts that given condition will be met in waitFor time, |
| 447 | // periodically checking target function each tick. In contrast to Eventually, |