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

Method EventuallyWithT

assert/assertion_forward.go:354–359  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

352// assert.True(c, externalValue, "expected 'externalValue' to be true")
353// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false")
354func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {
355 if h, ok := a.t.(tHelper); ok {
356 h.Helper()
357 }
358 return EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...)
359}
360
361// EventuallyWithTf asserts that given condition will be met in waitFor time,
362// periodically checking target function each tick. In contrast to Eventually,

Callers

nothing calls this directly

Calls 2

EventuallyWithTFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected