diff --git a/tracer/src/Datadog.Trace/Ci/Agent/Payloads/EventPlatformPayload.cs b/tracer/src/Datadog.Trace/Ci/Agent/Payloads/EventPlatformPayload.cs
index b7b0305c052f..e251e9ba4982 100644
--- a/tracer/src/Datadog.Trace/Ci/Agent/Payloads/EventPlatformPayload.cs
+++ b/tracer/src/Datadog.Trace/Ci/Agent/Payloads/EventPlatformPayload.cs
@@ -4,6 +4,7 @@
//
using System;
+using Datadog.Trace.Agent;
using Datadog.Trace.Ci.Configuration;
using Datadog.Trace.Telemetry.Metrics;
using Datadog.Trace.Util;
@@ -142,7 +143,18 @@ private void EnsureUrl()
else
{
// Use Agent EVP Proxy
- builder = new UriBuilder(_settings.TracerSettings.ExporterInternal.AgentUriInternal);
+ switch (_settings.TracerSettings.ExporterInternal.TracesTransport)
+ {
+ case TracesTransportType.WindowsNamedPipe:
+ case TracesTransportType.UnixDomainSocket:
+ builder = new UriBuilder("http://localhost");
+ break;
+ case TracesTransportType.Default:
+ default:
+ builder = new UriBuilder(_settings.TracerSettings.ExporterInternal.AgentUriInternal);
+ break;
+ }
+
if (CIVisibility.EventPlatformProxySupport == EventPlatformProxySupport.V4)
{
builder.Path = $"/evp_proxy/v4/{EventPlatformPath}";
diff --git a/tracer/src/Datadog.Trace/Ci/CIVisibility.cs b/tracer/src/Datadog.Trace/Ci/CIVisibility.cs
index 76d71e1d3e05..e62532a02263 100644
--- a/tracer/src/Datadog.Trace/Ci/CIVisibility.cs
+++ b/tracer/src/Datadog.Trace/Ci/CIVisibility.cs
@@ -12,10 +12,12 @@
using System.Threading.Tasks;
using Datadog.Trace.Agent;
using Datadog.Trace.Agent.DiscoveryService;
+using Datadog.Trace.Agent.StreamFactories;
using Datadog.Trace.Agent.Transports;
using Datadog.Trace.Ci.CiEnvironment;
using Datadog.Trace.Ci.Configuration;
using Datadog.Trace.Configuration;
+using Datadog.Trace.HttpOverStreams;
using Datadog.Trace.Logging;
using Datadog.Trace.Pdb;
using Datadog.Trace.PlatformHelpers;
@@ -425,48 +427,57 @@ internal static IApiRequestFactory GetRequestFactory(ImmutableTracerSettings set
internal static IApiRequestFactory GetRequestFactory(ImmutableTracerSettings tracerSettings, TimeSpan timeout)
{
IApiRequestFactory? factory = null;
-
+ var exporterSettings = tracerSettings.ExporterInternal;
+ if (exporterSettings.TracesTransport != TracesTransportType.Default)
+ {
+ factory = AgentTransportStrategy.Get(
+ exporterSettings,
+ productName: "CI Visibility",
+ tcpTimeout: null,
+ AgentHttpHeaderNames.DefaultHeaders,
+ () => new TraceAgentHttpHeaderHelper(),
+ uri => uri);
+ }
+ else
+ {
#if NETCOREAPP
- Log.Information("Using {FactoryType} for trace transport.", nameof(HttpClientRequestFactory));
- factory = new HttpClientRequestFactory(
- tracerSettings.ExporterInternal.AgentUriInternal,
- AgentHttpHeaderNames.DefaultHeaders,
- handler: new System.Net.Http.HttpClientHandler
- {
- AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
- },
- timeout: timeout);
+ Log.Information("Using {FactoryType} for trace transport.", nameof(HttpClientRequestFactory));
+ factory = new HttpClientRequestFactory(
+ exporterSettings.AgentUriInternal,
+ AgentHttpHeaderNames.DefaultHeaders,
+ handler: new System.Net.Http.HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate, },
+ timeout: timeout);
#else
- Log.Information("Using {FactoryType} for trace transport.", nameof(ApiWebRequestFactory));
- factory = new ApiWebRequestFactory(tracerSettings.ExporterInternal.AgentUriInternal, AgentHttpHeaderNames.DefaultHeaders, timeout: timeout);
+ Log.Information("Using {FactoryType} for trace transport.", nameof(ApiWebRequestFactory));
+ factory = new ApiWebRequestFactory(tracerSettings.ExporterInternal.AgentUriInternal, AgentHttpHeaderNames.DefaultHeaders, timeout: timeout);
#endif
+ var settings = Settings;
+ if (!string.IsNullOrWhiteSpace(settings.ProxyHttps))
+ {
+ var proxyHttpsUriBuilder = new UriBuilder(settings.ProxyHttps);
- var settings = Settings;
- if (!string.IsNullOrWhiteSpace(settings.ProxyHttps))
- {
- var proxyHttpsUriBuilder = new UriBuilder(settings.ProxyHttps);
+ var userName = proxyHttpsUriBuilder.UserName;
+ var password = proxyHttpsUriBuilder.Password;
- var userName = proxyHttpsUriBuilder.UserName;
- var password = proxyHttpsUriBuilder.Password;
+ proxyHttpsUriBuilder.UserName = string.Empty;
+ proxyHttpsUriBuilder.Password = string.Empty;
- proxyHttpsUriBuilder.UserName = string.Empty;
- proxyHttpsUriBuilder.Password = string.Empty;
+ if (proxyHttpsUriBuilder.Scheme == "https")
+ {
+ // HTTPS proxy is not supported by .NET BCL
+ Log.Error("HTTPS proxy is not supported. ({ProxyHttpsUriBuilder})", proxyHttpsUriBuilder);
+ return factory;
+ }
- if (proxyHttpsUriBuilder.Scheme == "https")
- {
- // HTTPS proxy is not supported by .NET BCL
- Log.Error("HTTPS proxy is not supported. ({ProxyHttpsUriBuilder})", proxyHttpsUriBuilder);
- return factory;
- }
+ NetworkCredential? credential = null;
+ if (!string.IsNullOrWhiteSpace(userName))
+ {
+ credential = new NetworkCredential(userName, password);
+ }
- NetworkCredential? credential = null;
- if (!string.IsNullOrWhiteSpace(userName))
- {
- credential = new NetworkCredential(userName, password);
+ Log.Information("Setting proxy to: {ProxyHttps}", proxyHttpsUriBuilder.Uri.ToString());
+ factory.SetProxy(new WebProxy(proxyHttpsUriBuilder.Uri, true, settings.ProxyNoProxy, credential), credential);
}
-
- Log.Information("Setting proxy to: {ProxyHttps}", proxyHttpsUriBuilder.Uri.ToString());
- factory.SetProxy(new WebProxy(proxyHttpsUriBuilder.Uri, true, settings.ProxyNoProxy, credential), credential);
}
return factory;
@@ -608,7 +619,8 @@ private static bool InternalEnabled()
Environment.CommandLine.IndexOf("dotnet.dll\" test", StringComparison.OrdinalIgnoreCase) == -1 &&
Environment.CommandLine.IndexOf("dotnet.dll' test", StringComparison.OrdinalIgnoreCase) == -1 &&
Environment.CommandLine.IndexOf(" test ", StringComparison.OrdinalIgnoreCase) == -1 &&
- Environment.CommandLine.IndexOf("datacollector", StringComparison.OrdinalIgnoreCase) == -1)
+ Environment.CommandLine.IndexOf("datacollector", StringComparison.OrdinalIgnoreCase) == -1 &&
+ Environment.CommandLine.IndexOf("vstest.console.dll", StringComparison.OrdinalIgnoreCase) == -1)
{
Log.Information("CI Visibility disabled because the process name is 'dotnet' but the commandline doesn't contain 'testhost.dll': {Cmdline}", Environment.CommandLine);
return false;
diff --git a/tracer/src/Datadog.Trace/Ci/IntelligentTestRunnerClient.cs b/tracer/src/Datadog.Trace/Ci/IntelligentTestRunnerClient.cs
index 639775feccce..9452e9c2bcd4 100644
--- a/tracer/src/Datadog.Trace/Ci/IntelligentTestRunnerClient.cs
+++ b/tracer/src/Datadog.Trace/Ci/IntelligentTestRunnerClient.cs
@@ -143,23 +143,22 @@ public IntelligentTestRunnerClient(string? workingDirectory, CIVisibilitySetting
else
{
// Use Agent EVP Proxy
- var agentUrl = _settings.TracerSettings.ExporterInternal.AgentUriInternal;
_eventPlatformProxySupport = CIVisibility.EventPlatformProxySupport;
switch (_eventPlatformProxySupport)
{
case EventPlatformProxySupport.V2:
- _settingsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v2/{settingsUrlPath}");
- _searchCommitsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v2/{searchCommitsUrlPath}");
- _packFileUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v2/{packFileUrlPath}");
- _skippableTestsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v2/{skippableTestsUrlPath}");
- _earlyFlakeDetectionTestsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v2/{efdTestsUrlPath}");
+ _settingsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v2/{settingsUrlPath}");
+ _searchCommitsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v2/{searchCommitsUrlPath}");
+ _packFileUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v2/{packFileUrlPath}");
+ _skippableTestsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v2/{skippableTestsUrlPath}");
+ _earlyFlakeDetectionTestsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v2/{efdTestsUrlPath}");
break;
case EventPlatformProxySupport.V4:
- _settingsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v4/{settingsUrlPath}");
- _searchCommitsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v4/{searchCommitsUrlPath}");
- _packFileUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v4/{packFileUrlPath}");
- _skippableTestsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v4/{skippableTestsUrlPath}");
- _earlyFlakeDetectionTestsUrl = UriHelpers.Combine(agentUrl, $"evp_proxy/v4/{efdTestsUrlPath}");
+ _settingsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v4/{settingsUrlPath}");
+ _searchCommitsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v4/{searchCommitsUrlPath}");
+ _packFileUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v4/{packFileUrlPath}");
+ _skippableTestsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v4/{skippableTestsUrlPath}");
+ _earlyFlakeDetectionTestsUrl = _apiRequestFactory.GetEndpoint($"evp_proxy/v4/{efdTestsUrlPath}");
break;
default:
throw new NotSupportedException("Event platform proxy not supported by the agent.");
diff --git a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Testing/DotnetTest/DotnetCommon.cs b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Testing/DotnetTest/DotnetCommon.cs
index d21a660f1cfe..fd5cc529d420 100644
--- a/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Testing/DotnetTest/DotnetCommon.cs
+++ b/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Testing/DotnetTest/DotnetCommon.cs
@@ -15,6 +15,7 @@
using Datadog.Trace.Configuration;
using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Logging;
+using Datadog.Trace.Propagators;
using Datadog.Trace.Util;
using Datadog.Trace.Vendors.Serilog.Events;
@@ -51,6 +52,16 @@ internal static bool IsDataCollectorDomain
return null;
}
+ // Let's detect if we already have a session for this test process
+ if (SpanContextPropagator.Instance.Extract(
+ EnvironmentHelpers.GetEnvironmentVariables(),
+ new DictionaryGetterAndSetter(DictionaryGetterAndSetter.EnvironmentVariableKeyProcessor)) is not null)
+ {
+ // Session found in the environment variables
+ // let's bail-out
+ return null;
+ }
+
var ciVisibilitySettings = CIVisibility.Settings;
var agentless = ciVisibilitySettings.Agentless;
var isEvpProxy = CIVisibility.EventPlatformProxySupport != EventPlatformProxySupport.None;
diff --git a/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp b/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp
index 107fbe01d283..74ce33ac0582 100644
--- a/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp
+++ b/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp
@@ -90,7 +90,8 @@ HRESULT STDMETHODCALLTYPE CorProfiler::Initialize(IUnknown* cor_profiler_info_un
// these are executed with exec, so we could check for that, but the
// below check is more conservative, so leaving at that
process_command_line.find(WStr("testhost")) == WSTRING::npos &&
- process_command_line.find(WStr("datacollector")) == WSTRING::npos)
+ process_command_line.find(WStr("datacollector")) == WSTRING::npos &&
+ process_command_line.find(WStr("vstest.console.dll")) == WSTRING::npos)
{
Logger::Info("The Tracer Profiler has been disabled because the process is running in CI Visibility "
"mode, the name is 'dotnet' but the commandline doesn't contain 'testhost'");
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitEvpTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitEvpTests.cs
new file mode 100644
index 000000000000..344a94afe670
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitEvpTests.cs
@@ -0,0 +1,75 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+#if NETCOREAPP3_1_OR_GREATER
+using System;
+using System.Threading.Tasks;
+using Datadog.Trace.Configuration;
+using Datadog.Trace.TestHelpers;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[Collection(nameof(TransportTestsCollection))]
+public class PipesXUnitEvpTests(ITestOutputHelper output) : XUnitEvpTests(output)
+{
+ [SkippableTheory]
+ [MemberData(nameof(GetData))]
+ [Trait("RunOnWindows", "True")]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ public override async Task SubmitTraces(string packageVersion, string evpVersionToRemove, bool expectedGzip)
+ {
+ SkipOn.Platform(SkipOn.PlatformValue.MacOs);
+ SkipOn.Platform(SkipOn.PlatformValue.Linux);
+ EnvironmentHelper.EnableWindowsNamedPipes();
+
+ // The server implementation of named pipes is flaky so have 5 attempts
+ var attemptsRemaining = 5;
+ while (true)
+ {
+ try
+ {
+ attemptsRemaining--;
+ await base.SubmitTraces(packageVersion, evpVersionToRemove, expectedGzip);
+ return;
+ }
+ catch (Exception ex) when (attemptsRemaining > 0 && ex is not SkipException)
+ {
+ await ReportRetry(Output, attemptsRemaining, ex);
+ }
+ }
+ }
+
+ [SkippableTheory]
+ [MemberData(nameof(GetDataForEarlyFlakeDetection))]
+ [Trait("RunOnWindows", "True")]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ [Trait("Category", "EarlyFlakeDetection")]
+ public override async Task EarlyFlakeDetection(string packageVersion, string evpVersionToRemove, bool expectedGzip, string settingsJson, string testsJson, int expectedSpans, string friendlyName)
+ {
+ SkipOn.Platform(SkipOn.PlatformValue.MacOs);
+ SkipOn.Platform(SkipOn.PlatformValue.Linux);
+ EnvironmentHelper.EnableWindowsNamedPipes();
+
+ // The server implementation of named pipes is flaky so have 5 attempts
+ var attemptsRemaining = 5;
+ while (true)
+ {
+ try
+ {
+ attemptsRemaining--;
+ await base.EarlyFlakeDetection(packageVersion, evpVersionToRemove, expectedGzip, settingsJson, testsJson, expectedSpans, friendlyName);
+ return;
+ }
+ catch (Exception ex) when (attemptsRemaining > 0 && ex is not SkipException)
+ {
+ await ReportRetry(Output, attemptsRemaining, ex);
+ }
+ }
+ }
+}
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitTests.cs
new file mode 100644
index 000000000000..80476281756e
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitTests.cs
@@ -0,0 +1,48 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+
+#if NETCOREAPP3_1_OR_GREATER
+using System;
+using System.Threading.Tasks;
+using Datadog.Trace.Configuration;
+using Datadog.Trace.TestHelpers;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[Collection(nameof(TransportTestsCollection))]
+public class PipesXUnitTests(ITestOutputHelper output) : XUnitTests(output)
+{
+ [SkippableTheory]
+ [MemberData(nameof(PackageVersions.XUnit), MemberType = typeof(PackageVersions))]
+ [Trait("RunOnWindows", "True")]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ public override async Task SubmitTraces(string packageVersion)
+ {
+ SkipOn.Platform(SkipOn.PlatformValue.MacOs);
+ SkipOn.Platform(SkipOn.PlatformValue.Linux);
+ EnvironmentHelper.EnableWindowsNamedPipes();
+
+ // The server implementation of named pipes is flaky so have 5 attempts
+ var attemptsRemaining = 5;
+ while (true)
+ {
+ try
+ {
+ attemptsRemaining--;
+ await base.SubmitTraces(packageVersion);
+ return;
+ }
+ catch (Exception ex) when (attemptsRemaining > 0 && ex is not SkipException)
+ {
+ await ReportRetry(Output, attemptsRemaining, ex);
+ }
+ }
+ }
+}
+
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitEvpTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitEvpTests.cs
new file mode 100644
index 000000000000..d552987bbefc
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitEvpTests.cs
@@ -0,0 +1,36 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+#if NETCOREAPP3_1_OR_GREATER
+using System.Threading.Tasks;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[Collection(nameof(TransportTestsCollection))]
+public class TcpXUnitEvpTests(ITestOutputHelper output) : XUnitEvpTests(output)
+{
+ [SkippableTheory]
+ [MemberData(nameof(GetData))]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ public override Task SubmitTraces(string packageVersion, string evpVersionToRemove, bool expectedGzip)
+ {
+ EnvironmentHelper.EnableDefaultTransport();
+ return base.SubmitTraces(packageVersion, evpVersionToRemove, expectedGzip);
+ }
+
+ [SkippableTheory]
+ [MemberData(nameof(GetDataForEarlyFlakeDetection))]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ [Trait("Category", "EarlyFlakeDetection")]
+ public override Task EarlyFlakeDetection(string packageVersion, string evpVersionToRemove, bool expectedGzip, string settingsJson, string testsJson, int expectedSpans, string friendlyName)
+ {
+ EnvironmentHelper.EnableDefaultTransport();
+ return base.EarlyFlakeDetection(packageVersion, evpVersionToRemove, expectedGzip, settingsJson, testsJson, expectedSpans, friendlyName);
+ }
+}
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitTests.cs
new file mode 100644
index 000000000000..33b0676363f6
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitTests.cs
@@ -0,0 +1,27 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+
+#if NETCOREAPP3_1_OR_GREATER
+using System.Threading.Tasks;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[Collection(nameof(TransportTestsCollection))]
+public class TcpXUnitTests(ITestOutputHelper output) : XUnitTests(output)
+{
+ [SkippableTheory]
+ [MemberData(nameof(PackageVersions.XUnit), MemberType = typeof(PackageVersions))]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ public override Task SubmitTraces(string packageVersion)
+ {
+ EnvironmentHelper.EnableDefaultTransport();
+ return base.SubmitTraces(packageVersion);
+ }
+}
+
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkEvpTest.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkEvpTest.cs
index 95552b76c52e..ac7f75fba56a 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkEvpTest.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkEvpTest.cs
@@ -19,32 +19,47 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
public abstract class TestingFrameworkEvpTest : TestHelper
{
+ private readonly GacFixture _gacFixture;
+
protected TestingFrameworkEvpTest(string sampleAppName, string samplePathOverrides, ITestOutputHelper output)
: base(sampleAppName, samplePathOverrides, output)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected TestingFrameworkEvpTest(string sampleAppName, string samplePathOverrides, ITestOutputHelper output, bool prependSamplesToAppName)
: base(sampleAppName, samplePathOverrides, output, prependSamplesToAppName)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected TestingFrameworkEvpTest(string sampleAppName, ITestOutputHelper output)
: base(sampleAppName, output)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected TestingFrameworkEvpTest(EnvironmentHelper environmentHelper, ITestOutputHelper output)
: base(environmentHelper, output)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected object? CIValues { get; private set; }
+ public override void Dispose()
+ {
+ _gacFixture.RemoveAssembliesFromGac();
+ }
+
protected virtual void WriteSpans(List? tests)
{
if (tests is null || tests.Count == 0)
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkTest.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkTest.cs
index 9d20619a71b4..45c04c06b1d3 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkTest.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TestingFrameworkTest.cs
@@ -19,32 +19,47 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
public abstract class TestingFrameworkTest : TestHelper
{
+ private readonly GacFixture _gacFixture;
+
protected TestingFrameworkTest(string sampleAppName, string samplePathOverrides, ITestOutputHelper output)
: base(sampleAppName, samplePathOverrides, output)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected TestingFrameworkTest(string sampleAppName, string samplePathOverrides, ITestOutputHelper output, bool prependSamplesToAppName)
: base(sampleAppName, samplePathOverrides, output, prependSamplesToAppName)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected TestingFrameworkTest(string sampleAppName, ITestOutputHelper output)
: base(sampleAppName, output)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected TestingFrameworkTest(EnvironmentHelper environmentHelper, ITestOutputHelper output)
: base(environmentHelper, output)
{
SetCIEnvironmentValues();
+ _gacFixture = new GacFixture();
+ _gacFixture.AddAssembliesToGac();
}
protected object? CIValues { get; private set; }
+ public override void Dispose()
+ {
+ _gacFixture.RemoveAssembliesFromGac();
+ }
+
protected virtual void WriteSpans(List? spans)
{
if (spans is null || spans.Count == 0)
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TransportTestsCollection.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TransportTestsCollection.cs
new file mode 100644
index 000000000000..d32c5fe8b711
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TransportTestsCollection.cs
@@ -0,0 +1,15 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+#if NETCOREAPP3_1_OR_GREATER
+using Xunit;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[CollectionDefinition(nameof(TransportTestsCollection), DisableParallelization = true)]
+public class TransportTestsCollection
+{
+}
+
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/UdsXUnitEvpTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/UdsXUnitEvpTests.cs
new file mode 100644
index 000000000000..d27cc9a9086e
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/UdsXUnitEvpTests.cs
@@ -0,0 +1,36 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+#if NETCOREAPP3_1_OR_GREATER
+using System.Threading.Tasks;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[Collection(nameof(TransportTestsCollection))]
+public class UdsXUnitEvpTests(ITestOutputHelper output) : XUnitEvpTests(output)
+{
+ [SkippableTheory]
+ [MemberData(nameof(GetData))]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ public override Task SubmitTraces(string packageVersion, string evpVersionToRemove, bool expectedGzip)
+ {
+ EnvironmentHelper.EnableUnixDomainSockets();
+ return base.SubmitTraces(packageVersion, evpVersionToRemove, expectedGzip);
+ }
+
+ [SkippableTheory]
+ [MemberData(nameof(GetDataForEarlyFlakeDetection))]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ [Trait("Category", "EarlyFlakeDetection")]
+ public override Task EarlyFlakeDetection(string packageVersion, string evpVersionToRemove, bool expectedGzip, string settingsJson, string testsJson, int expectedSpans, string friendlyName)
+ {
+ EnvironmentHelper.EnableUnixDomainSockets();
+ return base.EarlyFlakeDetection(packageVersion, evpVersionToRemove, expectedGzip, settingsJson, testsJson, expectedSpans, friendlyName);
+ }
+}
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/UdsXUnitTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/UdsXUnitTests.cs
new file mode 100644
index 000000000000..d09cd91cb5e6
--- /dev/null
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/UdsXUnitTests.cs
@@ -0,0 +1,26 @@
+//
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+//
+#if NETCOREAPP3_1_OR_GREATER
+using System.Threading.Tasks;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
+
+[Collection(nameof(TransportTestsCollection))]
+public class UdsXUnitTests(ITestOutputHelper output) : XUnitTests(output)
+{
+ [SkippableTheory]
+ [MemberData(nameof(PackageVersions.XUnit), MemberType = typeof(PackageVersions))]
+ [Trait("Category", "EndToEnd")]
+ [Trait("Category", "TestIntegrations")]
+ public override Task SubmitTraces(string packageVersion)
+ {
+ EnvironmentHelper.EnableUnixDomainSockets();
+ return base.SubmitTraces(packageVersion);
+ }
+}
+
+#endif
diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/XUnitEvpTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/XUnitEvpTests.cs
index d717a979b767..0bde4aaa3ae4 100644
--- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/XUnitEvpTests.cs
+++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/XUnitEvpTests.cs
@@ -28,7 +28,7 @@
namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI;
[UsesVerify]
-public class XUnitEvpTests : TestingFrameworkEvpTest
+public abstract class XUnitEvpTests : TestingFrameworkEvpTest
{
private const string TestBundleName = "Samples.XUnitTests";
private const string TestSuiteName = "Samples.XUnitTests.TestSuite";
@@ -74,13 +74,10 @@ public static IEnumerable