Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] fix leak in test #10197

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ func TestServiceTelemetryRestart(t *testing.T) {
// check telemetry server to ensure we get a response
var resp *http.Response

// #nosec G107
resp, err = http.Get(telemetryURL)
assert.NoError(t, err)
assert.NoError(t, resp.Body.Close())
assert.Equal(t, http.StatusOK, resp.StatusCode)

// Shutdown the service
Expand All @@ -338,8 +338,8 @@ func TestServiceTelemetryRestart(t *testing.T) {
// check telemetry server to ensure we get a response
require.Eventually(t,
func() bool {
// #nosec G107
resp, err = http.Get(telemetryURL)
assert.NoError(t, resp.Body.Close())
return err == nil
},
500*time.Millisecond,
Expand Down
Loading