Skip to content

Commit

Permalink
fixed failing tests and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-filipponi committed Aug 21, 2024
1 parent 710e12a commit 835a213
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions instrumentation/net/http/otelhttp/test/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,15 +585,14 @@ func TestDefaultAttributesHandling(t *testing.T) {
require.NoError(t, err)

resp, err := client.Do(r)
resp.Body.Close()
require.NoError(t, err)

_ = resp.Body.Close()

err = reader.Collect(ctx, &rm)
assert.NoError(t, err)

// http.client.response.size is not recorded so the assert.Len
// above should be 2 instead of 3(test bonus)
assert.Len(t, rm.ScopeMetrics[0].Metrics, 2)
assert.Len(t, rm.ScopeMetrics[0].Metrics, 3)
for _, m := range rm.ScopeMetrics[0].Metrics {
switch m.Name {
case clientRequestSize:
Expand Down

0 comments on commit 835a213

Please sign in to comment.