Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions monitoring/prometheus/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func TestLifecycle(t *testing.T) {
// Query the service to ensure it really started.
resp, err := http.Get(fmt.Sprintf("http://localhost:%d/metrics", port))
require.NoError(t, err)
// Close response body to avoid leaking connections.
defer resp.Body.Close()
assert.NotEqual(t, uint64(0), resp.ContentLength, "Unexpected content length 0")

err = prometheusService.Stop()
Expand Down