-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
assert.EventuallyAbout assert.Eventually/EventuallyWithTAbout assert.Eventually/EventuallyWithTbugpkg-assertChange related to package testify/assertChange related to package testify/assert
Description
I've used a tightly timed 'Eventually' in my test:
assert.Eventually(t, func() bool { ... }, time.Millisecond*100, time.Millisecond)
ran it with -race -count=1000 and i got:
==================
WARNING: DATA RACE
Write at 0x00c0000ba5b0 by goroutine 34:
runtime.closechan()
/.../go/go1.12.9/src/runtime/chan.go:334 +0x0
github.com/stretchr/testify/assert.Eventually()
/.../go/go1.12.9/pkg/mod/github.com/stretchr/testify@v1.4.0/assert/assertions.go:1490 +0x29e
github.com/stretchr/testify/require.Eventually()
/.../go/go1.12.9/pkg/mod/github.com/stretchr/testify@v1.4.0/require/require.go:278 +0xaf
command-line-arguments_test.TestPeriodicalTriggerStopWorksWhenContextIsCancelled.func1()
...
Previous read at 0x00c0000ba5b0 by goroutine 62:
runtime.chansend()
/.../go/go1.12.9/src/runtime/chan.go:142 +0x0
github.com/stretchr/testify/assert.Eventually.func1()
/.../go/go1.12.9/pkg/mod/github.com/stretchr/testify@v1.4.0/assert/assertions.go:1494 +0x54
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
assert.EventuallyAbout assert.Eventually/EventuallyWithTAbout assert.Eventually/EventuallyWithTbugpkg-assertChange related to package testify/assertChange related to package testify/assert