diff --git a/ElasticApmAgent.sln b/ElasticApmAgent.sln
index 8d1aeedd1..53989af2a 100644
--- a/ElasticApmAgent.sln
+++ b/ElasticApmAgent.sln
@@ -18,6 +18,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{267A241E-571F-458F-B04C-B6C4DE79E735}"
ProjectSection(SolutionItems) = preProject
test\Directory.Build.props = test\Directory.Build.props
+ test\xunit.runner.json = test\xunit.runner.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Apm", "src\Elastic.Apm\Elastic.Apm.csproj", "{90BC9629-C8D2-4FD5-863E-EA2D5FB37341}"
diff --git a/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/Elastic.Clients.Elasticsearch.Tests.csproj b/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/Elastic.Clients.Elasticsearch.Tests.csproj
index 3c75cf2b9..a67d81364 100644
--- a/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/Elastic.Clients.Elasticsearch.Tests.csproj
+++ b/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/Elastic.Clients.Elasticsearch.Tests.csproj
@@ -20,6 +20,6 @@
-
+
diff --git a/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/xunit.runner.json b/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/xunit.runner.json
deleted file mode 100644
index 68790c3cc..000000000
--- a/test/instrumentations/Elastic.Clients.Elasticsearch.Tests/xunit.runner.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
- "diagnosticMessages": true
-}
\ No newline at end of file
diff --git a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCommandTests.cs b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCommandTests.cs
index 3a82be656..4ca5a192d 100644
--- a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCommandTests.cs
+++ b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCommandTests.cs
@@ -32,8 +32,7 @@ public OracleManagedDataAccessCommandTests(OracleSqlFixture fixture, ITestOutput
[InlineData("net462")]
public async Task CaptureAutoInstrumentedSpans(string targetFramework)
{
- if (!TestEnvironment.IsWindows)
- return;
+ if (!TestEnvironment.IsWindows) return;
var apmLogger = new InMemoryBlockingLogger(Elastic.Apm.Logging.LogLevel.Error);
var apmServer = new MockApmServer(apmLogger, nameof(CaptureAutoInstrumentedSpans));
diff --git a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCoreCommandTests.cs b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCoreCommandTests.cs
index d33c9e341..9483dcbcb 100644
--- a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCoreCommandTests.cs
+++ b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleManagedDataAccessCoreCommandTests.cs
@@ -32,6 +32,8 @@ public OracleManagedDataAccessCoreCommandTests(OracleSqlFixture fixture, ITestOu
[ClassData(typeof(AdoNetTestData))]
public async Task CaptureAutoInstrumentedSpans(string targetFramework)
{
+ if (!TestEnvironment.IsWindows) return;
+
var apmLogger = new InMemoryBlockingLogger(Elastic.Apm.Logging.LogLevel.Error);
var apmServer = new MockApmServer(apmLogger, nameof(CaptureAutoInstrumentedSpans));
var port = apmServer.FindAvailablePortToListen();
diff --git a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleSqlFixture.cs b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleSqlFixture.cs
index f868db9ee..c76683d97 100644
--- a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleSqlFixture.cs
+++ b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/AdoNet/OracleSqlFixture.cs
@@ -4,8 +4,11 @@
// See the LICENSE file in the project root for more information
using System.Threading.Tasks;
+using Elastic.Apm.Tests.Utilities;
using Testcontainers.Oracle;
using Xunit;
+using Xunit.Abstractions;
+using Xunit.Sdk;
namespace Elastic.Apm.Profiler.Managed.Tests.AdoNet
{
@@ -15,10 +18,23 @@ public sealed class OracleCollection : ICollectionFixture { }
public sealed class OracleSqlFixture : IAsyncLifetime
{
private readonly OracleContainer _container = new OracleBuilder().Build();
+ private readonly IMessageSink _sink;
public string ConnectionString => _container.GetConnectionString();
- public Task InitializeAsync() => _container.StartAsync();
+ public OracleSqlFixture(IMessageSink sink) => _sink = sink;
+
+ public async Task InitializeAsync()
+ {
+ if (!TestEnvironment.IsWindows) return;
+
+ await _container.StartAsync();
+ var (stdOut, stdErr) = await _container.GetLogsAsync();
+
+ _sink.OnMessage(new DiagnosticMessage(stdOut));
+ _sink.OnMessage(new DiagnosticMessage(stdErr));
+
+ }
public Task DisposeAsync() => _container.DisposeAsync().AsTask();
}
diff --git a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Elastic.Apm.Profiler.Managed.Tests.csproj b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Elastic.Apm.Profiler.Managed.Tests.csproj
index 782c06f3b..1bf473894 100644
--- a/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Elastic.Apm.Profiler.Managed.Tests.csproj
+++ b/test/profiler/Elastic.Apm.Profiler.Managed.Tests/Elastic.Apm.Profiler.Managed.Tests.csproj
@@ -26,4 +26,8 @@
+
+
+
+
diff --git a/test/xunit.runner.json b/test/xunit.runner.json
new file mode 100644
index 000000000..9c5ec42ee
--- /dev/null
+++ b/test/xunit.runner.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
+ "diagnosticMessages": true,
+ "internalDiagnosticMessages": true,
+ "longRunningTestSeconds": 2
+}
\ No newline at end of file