EventuallyWithTf 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 cons
(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{})
| 462 | // require.True(c, externalValue, "expected 'externalValue' to be true") |
| 463 | // }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") |
| 464 | func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { |
| 465 | if h, ok := t.(tHelper); ok { |
| 466 | h.Helper() |
| 467 | } |
| 468 | if assert.EventuallyWithTf(t, condition, waitFor, tick, msg, args...) { |
| 469 | return |
| 470 | } |
| 471 | t.FailNow() |
| 472 | } |
| 473 | |
| 474 | // Eventuallyf asserts that given condition will be met in waitFor time, |
| 475 | // periodically checking target function each tick. |
no test coverage detected