From 3f1fbb010c168998b55567ac61d758a298a0d631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 10 Jun 2024 14:36:12 +0200 Subject: [PATCH] Fix SqlClient tests --- .../SqlClientTests.cs | 1 + .../SqlEventSourceTests.netfx.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs index 25d0252557..22dea15a54 100644 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs +++ b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs @@ -14,6 +14,7 @@ namespace OpenTelemetry.Instrumentation.SqlClient.Tests; +[Collection("SqlClient")] public class SqlClientTests : IDisposable { #if !NETFRAMEWORK diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlEventSourceTests.netfx.cs b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlEventSourceTests.netfx.cs index 60e20b880a..fe89800745 100644 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlEventSourceTests.netfx.cs +++ b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlEventSourceTests.netfx.cs @@ -13,6 +13,7 @@ namespace OpenTelemetry.Instrumentation.SqlClient.Tests; +[Collection("SqlClient")] public class SqlEventSourceTests { /* @@ -176,7 +177,7 @@ public void DefaultCaptureTextFalse(Type eventSourceType) using IFakeBehavingSqlEventSource fakeSqlEventSource = (IFakeBehavingSqlEventSource)Activator.CreateInstance(eventSourceType); var exportedItems = new List(); - using var shutdownSignal = Sdk.CreateTracerProviderBuilder() + var shutdownSignal = Sdk.CreateTracerProviderBuilder() .AddInMemoryExporter(exportedItems) .AddSqlClientInstrumentation() .Build();