MCPcopy
hub / github.com/stretchr/testify / EventuallyWithTf

Method EventuallyWithTf

assert/assertion_forward.go:379–384  ·  view source on GitHub ↗

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

(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

377// assert.True(c, externalValue, "expected 'externalValue' to be true")
378// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false")
379func (a *Assertions) EventuallyWithTf(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {
380 if h, ok := a.t.(tHelper); ok {
381 h.Helper()
382 }
383 return EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...)
384}
385
386// Eventuallyf asserts that given condition will be met in waitFor time,
387// periodically checking target function each tick.

Callers

nothing calls this directly

Calls 2

EventuallyWithTfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected