From 349ad30abdeb56e3933574142fb0e0a68785854d Mon Sep 17 00:00:00 2001 From: haya14busa Date: Fri, 10 Feb 2017 01:19:35 +0900 Subject: [PATCH] context/ctxhttp: close httptest server Change-Id: Ic8192f74337e021a5d72feb07b9648619d778235 Reviewed-on: https://go-review.googlesource.com/36673 Reviewed-by: Matt Layher Run-TryBot: Matt Layher TryBot-Result: Gobot Gobot --- context/ctxhttp/ctxhttp_17_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/context/ctxhttp/ctxhttp_17_test.go b/context/ctxhttp/ctxhttp_17_test.go index 9f0f90f1..72411b1b 100644 --- a/context/ctxhttp/ctxhttp_17_test.go +++ b/context/ctxhttp/ctxhttp_17_test.go @@ -19,6 +19,7 @@ func TestGo17Context(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "ok") })) + defer ts.Close() ctx := context.Background() resp, err := Get(ctx, http.DefaultClient, ts.URL) if resp == nil || err != nil {