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

Function TestEventuallyWithTTrue

assert/assertions_test.go:3424–3438  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3422}
3423
3424func TestEventuallyWithTTrue(t *testing.T) {
3425 t.Parallel()
3426
3427 mockT := new(errorsCapturingT)
3428
3429 counter := 0
3430 condition := func(collect *CollectT) {
3431 counter += 1
3432 True(collect, counter == 2)
3433 }
3434
3435 True(t, EventuallyWithT(mockT, condition, 100*time.Millisecond, 20*time.Millisecond))
3436 Len(t, mockT.errors, 0)
3437 Equal(t, 2, counter, "Condition is expected to be called 2 times")
3438}
3439
3440func TestEventuallyWithT_ConcurrencySafe(t *testing.T) {
3441 t.Parallel()

Callers

nothing calls this directly

Calls 4

TrueFunction · 0.70
EventuallyWithTFunction · 0.70
LenFunction · 0.70
EqualFunction · 0.70

Tested by

no test coverage detected