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{})
| 449 | // assert.True(c, externalValue, "expected 'externalValue' to be true") |
| 450 | // }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") |
| 451 | func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { |
| 452 | if h, ok := t.(tHelper); ok { |
| 453 | h.Helper() |
| 454 | } |
| 455 | if assert.EventuallyWithTf(t, condition, waitFor, tick, msg, args...) { |
| 456 | return |
| 457 | } |
| 458 | t.FailNow() |
| 459 | } |
| 460 | |
| 461 | // Eventuallyf asserts that given condition will be met in waitFor time, |
| 462 | // periodically checking target function each tick. |
no test coverage detected
searching dependent graphs…