X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/16b445f3d52952d284dbaac603e70a7196d9a3e9..dc30a6ce8d203be0be1f11491fc8bf0071b3ec9e:/lib/controller/rails_restart_test.go diff --git a/lib/controller/rails_restart_test.go b/lib/controller/rails_restart_test.go index 5db37c4b8a..e3267c220f 100644 --- a/lib/controller/rails_restart_test.go +++ b/lib/controller/rails_restart_test.go @@ -79,9 +79,11 @@ func (s *railsRestartSuite) TestConfigReload(c *check.C) { for deadline := time.Now().Add(20 * time.Second); time.Now().Before(deadline); time.Sleep(time.Second) { resp, err = hc.Do(req) c.Assert(err, check.IsNil) + defer resp.Body.Close() c.Check(resp.StatusCode, check.Equals, http.StatusOK) body, err = ioutil.ReadAll(resp.Body) c.Assert(err, check.IsNil) + resp.Body.Close() if strings.Contains(string(body), newhash) { break }