summaryrefslogtreecommitdiff
path: root/service/http/h2c_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/http/h2c_test.go')
-rw-r--r--service/http/h2c_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/service/http/h2c_test.go b/service/http/h2c_test.go
index d806e5ff..e2669845 100644
--- a/service/http/h2c_test.go
+++ b/service/http/h2c_test.go
@@ -49,7 +49,12 @@ func Test_Service_H2C(t *testing.T) {
r, err := http.DefaultClient.Do(req)
assert.NoError(t, err)
- defer r.Body.Close()
+ defer func() {
+ err := r.Body.Close()
+ if err != nil {
+ t.Errorf("fail to close the Body: error %v", err)
+ }
+ }()
assert.Equal(t, "101 Switching Protocols", r.Status)