Commit 349ad30a authored by haya14busa's avatar haya14busa Committed by Brad Fitzpatrick

context/ctxhttp: close httptest server

Change-Id: Ic8192f74337e021a5d72feb07b9648619d778235
Reviewed-on: https://go-review.googlesource.com/36673Reviewed-by: 's avatarMatt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 236b8f04
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment