You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8.3 darwin/amd64
What operating system and processor architecture are you using (go env)?
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
What did you do?
Running t.Fatal(err) inside multiple goroutines with the -race flag
What did you expect to see?
The testing package to be thread-safe and not report data races when running the -race flag.
I'm not 100% sure this isn't related to my code, but based on the error I think it's because I'm calling t.Fatal(err) from multiple goroutines. So I'd just like some clarity there.
What did you see instead?
Write at 0x00c42014e524 by goroutine 10:
testing.tRunner()
/usr/local/go/src/testing/testing.go:658 +0x119
Previous write at 0x00c42014e524 by goroutine 62:
testing.(*common).FailNow()
/usr/local/go/src/testing/testing.go:485 +0x4a
testing.(*common).Fatal()
/usr/local/go/src/testing/testing.go:524 +0x7c
command-line-arguments_test.TestPageSetControlNavigations.func1()
/Users/matt/go/src/github.com/api/api_test.go:241 +0x2d3
The text was updated successfully, but these errors were encountered:
A test ends when its Test function returns or calls any of the methods FailNow, Fatal, Fatalf, SkipNow, Skip, or Skipf. Those methods, as well as the Parallel method, must be called only from the goroutine running the Test function.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOHOSTARCH="amd64"
GOHOSTOS="darwin"
What did you do?
Running
t.Fatal(err)
inside multiple goroutines with the-race
flagWhat did you expect to see?
The testing package to be thread-safe and not report data races when running the
-race
flag.I'm not 100% sure this isn't related to my code, but based on the error I think it's because I'm calling
t.Fatal(err)
from multiple goroutines. So I'd just like some clarity there.What did you see instead?
The text was updated successfully, but these errors were encountered: