Skip to content

Commit

Permalink
Fix TestTransportErrorStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Jul 31, 2024
1 parent a35b5b8 commit 3d1635b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions instrumentation/net/http/otelhttp/test/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,11 @@ func TestTransportErrorStatus(t *testing.T) {
}
resp, err := c.Do(r)
if err == nil {
t.Fatal("transport should have returned an error, it didn't")
}
defer func() {
if err := resp.Body.Close(); err != nil {
t.Errorf("close response body: %v", err)
}
}()
t.Fatal("transport should have returned an error, it didn't")
}

// Check span.
spans := spanRecorder.Ended()
Expand Down

0 comments on commit 3d1635b

Please sign in to comment.