mirror of
https://github.com/stretchr/testify.git
synced 2025-07-10 20:49:09 +00:00
Document that require is not safe to call in created goroutines
This commit is contained in:
parent
f97607b898
commit
e18a70d446
@ -104,6 +104,8 @@ func TestSomething(t *testing.T) {
|
|||||||
---------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
The `require` package provides same global functions as the `assert` package, but instead of returning a boolean result they terminate current test.
|
The `require` package provides same global functions as the `assert` package, but instead of returning a boolean result they terminate current test.
|
||||||
|
These functions must be called from the goroutine running the test or benchmark function, not from other goroutines created during the test.
|
||||||
|
Otherwise race conditions may occur.
|
||||||
|
|
||||||
See [t.FailNow](http://golang.org/pkg/testing/#T.FailNow) for details.
|
See [t.FailNow](http://golang.org/pkg/testing/#T.FailNow) for details.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user