From 0fd3941cf0a4612304a2a68ea39441beb98a9770 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Mon, 13 Apr 2020 13:59:36 +0100 Subject: [PATCH] courier: Don't call testing.T.Fatalf from a goroutine Calling testing.T.Fatalf from a new goroutine is not supported; since this should be quite exceptional, we just panic instead. --- internal/courier/smtp_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/courier/smtp_test.go b/internal/courier/smtp_test.go index 6cd83df..8af462b 100644 --- a/internal/courier/smtp_test.go +++ b/internal/courier/smtp_test.go @@ -55,7 +55,7 @@ func fakeServer(t *testing.T, responses map[string]string) (string, *sync.WaitGr c, err := l.Accept() if err != nil { - t.Fatalf("fake server accept: %v", err) + panic(err) } defer c.Close()