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{})
| 421 | // assert.True(c, externalValue, "expected 'externalValue' to be true") |
| 422 | // }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") |
| 423 | func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { |
| 424 | if h, ok := t.(tHelper); ok { |
| 425 | h.Helper() |
| 426 | } |
| 427 | if assert.EventuallyWithT(t, condition, waitFor, tick, msgAndArgs...) { |
| 428 | return |
| 429 | } |
| 430 | t.FailNow() |
| 431 | } |
| 432 | |
| 433 | // EventuallyWithTf asserts that given condition will be met in waitFor time, |
| 434 | // periodically checking target function each tick. In contrast to Eventually, |
no test coverage detected
searching dependent graphs…