From 710e12a472753d021611f27625b02be8109ed1ff Mon Sep 17 00:00:00 2001 From: Luca Filipponi Date: Wed, 21 Aug 2024 09:06:40 +0100 Subject: [PATCH] Update instrumentation/net/http/otelhttp/test/transport_test.go Co-authored-by: Damien Mathieu <42@dmathieu.com> --- instrumentation/net/http/otelhttp/test/transport_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instrumentation/net/http/otelhttp/test/transport_test.go b/instrumentation/net/http/otelhttp/test/transport_test.go index a5963008819..dfe8bcc78a8 100644 --- a/instrumentation/net/http/otelhttp/test/transport_test.go +++ b/instrumentation/net/http/otelhttp/test/transport_test.go @@ -584,7 +584,8 @@ func TestDefaultAttributesHandling(t *testing.T) { r, err := http.NewRequest(http.MethodGet, ts.URL, nil) require.NoError(t, err) - _, err = client.Do(r) + resp, err := client.Do(r) + resp.Body.Close() require.NoError(t, err) err = reader.Collect(ctx, &rm)