MCPcopy
hub / github.com/expr-lang/expr / EventuallyWithT

Method EventuallyWithT

internal/testify/assert/assertion_forward.go:340–345  ·  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

338// assert.True(c, externalValue, "expected 'externalValue' to be true")
339// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false")
340func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {
341 if h, ok := a.t.(tHelper); ok {
342 h.Helper()
343 }
344 return EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...)
345}
346
347// EventuallyWithTf asserts that given condition will be met in waitFor time,
348// periodically checking target function each tick. In contrast to Eventually,

Callers

nothing calls this directly

Calls 2

EventuallyWithTFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected