From 58129543de50fb4208b9617ca16336e038d793a2 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Wed, 28 Nov 2018 14:34:04 +0300 Subject: [PATCH] Fix panic in upstream test if upstream returns with i/o timeout --- upstream/upstream_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upstream/upstream_test.go b/upstream/upstream_test.go index cc643a3b..9221e6f5 100644 --- a/upstream/upstream_test.go +++ b/upstream/upstream_test.go @@ -167,11 +167,11 @@ func testUpstream(t *testing.T, u Upstream) { resp, err := u.Exchange(context.Background(), &req) if err != nil { - t.Errorf("error while making an upstream request: %s", err) + t.Fatalf("error while making an upstream request: %s", err) } if len(resp.Answer) != 1 { - t.Errorf("no answer section in the response") + t.Fatalf("no answer section in the response") } if answer, ok := resp.Answer[0].(*dns.A); ok { if !test.expected.Equal(answer.A) {