Skip to content

Commit

Permalink
test: close response bodies in testHttp
Browse files Browse the repository at this point in the history
Otherwise, the request connections are kept open since we never finish
reading the response body.
  • Loading branch information
mvdan committed Sep 5, 2017
1 parent cbd22a5 commit db4363a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ func testHttp(t *testing.T, tests []tykHttpTest, separateControlPort bool) {
t.Error(err)
continue
}
resp.Body.Close()

if resp.StatusCode != tc.code {
t.Errorf("[%d]%s%s %s Status %d, want %d", ti, tPrefix, tc.method, tc.path, resp.StatusCode, tc.code)
Expand Down

0 comments on commit db4363a

Please sign in to comment.