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

Function TestEventuallyWithT_ConcurrencySafe

assert/assertions_test.go:3440–3452  ·  assert/assertions_test.go::TestEventuallyWithT_ConcurrencySafe
(t *testing.T)

Source from the content-addressed store, hash-verified

3438}
3439
3440func TestEventuallyWithT_ConcurrencySafe(t *testing.T) {
3441 t.Parallel()
3442
3443 mockT := new(errorsCapturingT)
3444
3445 condition := func(collect *CollectT) {
3446 Fail(collect, "condition fixed failure")
3447 }
3448
3449 // To trigger race conditions, we run EventuallyWithT with a nanosecond tick.
3450 False(t, EventuallyWithT(mockT, condition, 100*time.Millisecond, time.Nanosecond))
3451 Len(t, mockT.errors, 2)
3452}
3453
3454func TestEventuallyWithT_ReturnsTheLatestFinishedConditionErrors(t *testing.T) {
3455 t.Parallel()

Callers

nothing calls this directly

Calls 4

FailFunction · 0.70
FalseFunction · 0.70
EventuallyWithTFunction · 0.70
LenFunction · 0.70

Tested by

no test coverage detected