Skip to content

Commit 4574014

Browse files
committed
🐛 Integration test should close http body
Signed-off-by: Vince Prignano <[email protected]>
1 parent 066ff64 commit 4574014

File tree

1 file changed

+6
-3
lines changed
  • pkg/internal/testing/integration/internal

1 file changed

+6
-3
lines changed

pkg/internal/testing/integration/internal/process.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,12 @@ func pollURLUntilOK(url url.URL, interval time.Duration, ready chan bool, stopCh
170170
}
171171
for {
172172
res, err := http.Get(url.String())
173-
if err == nil && res.StatusCode == http.StatusOK {
174-
ready <- true
175-
return
173+
if err == nil {
174+
res.Body.Close()
175+
if res.StatusCode == http.StatusOK {
176+
ready <- true
177+
return
178+
}
176179
}
177180

178181
select {

0 commit comments

Comments
 (0)