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

Function EventuallyWithT

internal/testify/require/require.go:423–431  ·  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

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

Source from the content-addressed store, hash-verified

421// assert.True(c, externalValue, "expected 'externalValue' to be true")
422// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false")
423func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {
424 if h, ok := t.(tHelper); ok {
425 h.Helper()
426 }
427 if assert.EventuallyWithT(t, condition, waitFor, tick, msgAndArgs...) {
428 return
429 }
430 t.FailNow()
431}
432
433// EventuallyWithTf asserts that given condition will be met in waitFor time,
434// periodically checking target function each tick. In contrast to Eventually,

Callers 1

EventuallyWithTMethod · 0.70

Calls 3

EventuallyWithTFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…