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
förälder b8725556fa
incheckning 58695365b9
2 ändrade filer med 6 tillägg och 3 borttagningar

Visa fil

@ -206,7 +206,8 @@ func TestRenegotiationExtension(t *testing.T) {
buf = make([]byte, 1024)
n, err := c.Read(buf)
if err != nil {
t.Fatalf("Server read returned error: %s", err)
t.Errorf("Server read returned error: %s", err)
return
}
buf = buf[:n]
c.Close()

Visa fil

@ -295,12 +295,14 @@ func TestTLSUniqueMatches(t *testing.T) {
for i := 0; i < 2; i++ {
sconn, err := ln.Accept()
if err != nil {
t.Fatal(err)
t.Error(err)
return
}
serverConfig := testConfig.Clone()
srv := Server(sconn, serverConfig)
if err := srv.Handshake(); err != nil {
t.Fatal(err)
t.Error(err)
return
}
serverTLSUniques <- srv.ConnectionState().TLSUnique
}