all: don't call t.Fatal from a goroutine

Fixes #17900.

Change-Id: I42cda6ac9cf48ed739d3a015a90b3cb15edf8ddf
Reviewed-on: https://go-review.googlesource.com/33243
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-11-14 21:34:58 -08:00
parent 9be14c4058
commit a145890059
14 changed files with 68 additions and 40 deletions

View file

@ -2514,7 +2514,8 @@ func TestConnectionLeak(t *testing.T) {
go func() {
r, err := db.Query("SELECT|people|name|")
if err != nil {
t.Fatal(err)
t.Error(err)
return
}
r.Close()
wg.Done()