Skip to content

Commit 835a213

Browse files
fixed failing tests and linter
1 parent 710e12a commit 835a213

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

instrumentation/net/http/otelhttp/test/transport_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,15 +585,14 @@ func TestDefaultAttributesHandling(t *testing.T) {
585585
require.NoError(t, err)
586586

587587
resp, err := client.Do(r)
588-
resp.Body.Close()
589588
require.NoError(t, err)
590589

590+
_ = resp.Body.Close()
591+
591592
err = reader.Collect(ctx, &rm)
592593
assert.NoError(t, err)
593594

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

0 commit comments

Comments
 (0)