From b1dcc14ee17b355aad3908c8523ec19dfcc309dd Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Wed, 4 Nov 2020 12:05:36 -0800 Subject: [PATCH] Fix HttpWebRequest test issue (#1460) --- .../HttpWebRequestActivitySourceTests.netfx.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs index da6d4143a6..581d3bbd92 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs @@ -48,8 +48,9 @@ static HttpWebRequestActivitySourceTests() HttpWebRequestActivitySource.Options = options; - // Need to touch something in HttpWebRequestActivitySource to do the static injection. + // Need to touch something in HttpWebRequestActivitySource/Sdk to do the static injection. GC.KeepAlive(HttpWebRequestActivitySource.Options); + _ = Sdk.SuppressInstrumentation; } public HttpWebRequestActivitySourceTests()