From c43be6cf875a6557cb4c42cfd9f65b612e8b4cd7 Mon Sep 17 00:00:00 2001 From: Boqin Qin Date: Fri, 1 May 2020 19:48:52 +0800 Subject: [PATCH] les: remove invalid use of t.Fatal in TestHandshake (#21012) --- les/peer_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/les/peer_test.go b/les/peer_test.go index 8309e3557..6d3c7f975 100644 --- a/les/peer_test.go +++ b/les/peer_test.go @@ -18,6 +18,7 @@ package les import ( "crypto/rand" + "errors" "math/big" "reflect" "sort" @@ -121,10 +122,10 @@ func TestHandshake(t *testing.T) { var reqType uint64 err := recv.get("announceType", &reqType) if err != nil { - t.Fatal(err) + return err } if reqType != announceTypeSigned { - t.Fatal("Expected announceTypeSigned") + return errors.New("Expected announceTypeSigned") } return nil })