From 4be9a40b8969f86b003c50c079e3f492ed924bbd Mon Sep 17 00:00:00 2001 From: Krasi Georgiev Date: Sat, 13 Jan 2018 10:37:38 +0000 Subject: [PATCH] fatalf is not thread safe so using panic instead (#3680) --- web/web_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/web_test.go b/web/web_test.go index e761d7c27..a9cd7bb02 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -15,6 +15,7 @@ package web import ( "context" + "fmt" "io/ioutil" "net/http" "net/http/httptest" @@ -115,7 +116,7 @@ func TestReadyAndHealthy(t *testing.T) { go func() { err := webHandler.Run(context.Background()) if err != nil { - t.Fatalf("Can't start web handler:%s", err) + panic(fmt.Sprintf("Can't start web handler:%s", err)) } }() @@ -211,7 +212,7 @@ func TestRoutePrefix(t *testing.T) { go func() { err := webHandler.Run(context.Background()) if err != nil { - t.Fatalf("Can't start web handler:%s", err) + panic(fmt.Sprintf("Can't start web handler:%s", err)) } }()