From d827531c804ff73b3b33807f69a7b3f234121d4e Mon Sep 17 00:00:00 2001 From: timakin Date: Tue, 11 Apr 2017 13:40:56 +0900 Subject: [PATCH] static check error --- context_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/context_test.go b/context_test.go index 7438fe5..cd09045 100644 --- a/context_test.go +++ b/context_test.go @@ -2,6 +2,7 @@ package sigctx import ( "context" + "fmt" "os" "runtime" "sync" @@ -26,7 +27,7 @@ func TestWithSignals(t *testing.T) { time.Sleep(time.Millisecond * 100) p, err := os.FindProcess(pid) if err != nil { - t.Fatal("Failed to get pid") + panic(fmt.Sprint("Failed to get pid")) } if err := p.Signal(syscall.SIGUSR1); err != nil { t.Error(err.Error()) @@ -106,7 +107,7 @@ func TestWithCancelSignals(t *testing.T) { time.Sleep(time.Millisecond * 200) p, err := os.FindProcess(pid) if err != nil { - t.Fatal("Failed to get pid") + panic(fmt.Sprint("Failed to get pid")) } p.Signal(syscall.SIGUSR1) time.Sleep(time.Second * 3)