Skip to content

Commit d526168

Browse files
committed
Target .NET 8.0 for instrumentation tests
They end up getting created with whatever preview .NET 10 version and then end up looking for that and not finding it when running within the .NET 8.0 job. This should force them to build with .NET 8 and then run with .NET 8 (I think)
1 parent 144b672 commit d526168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/InstrumentationTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public async Task DoesNotInstrumentDotnetBuild()
8282

8383
using var agent = EnvironmentHelper.GetMockAgent(useTelemetry: true);
8484

85-
var logDir = await RunDotnet("new console -n instrumentation_test -o . --no-restore");
85+
var logDir = await RunDotnet("new console -n instrumentation_test -o . --no-restore -f net8.0");
8686
AssertNotInstrumented(agent, logDir);
8787

8888
logDir = await RunDotnet("restore");
@@ -114,7 +114,7 @@ public async Task DoesNotInstrumentExcludedNames(string excludedProcess)
114114

115115
using var agent = EnvironmentHelper.GetMockAgent(useTelemetry: true);
116116

117-
var logDir = await RunDotnet($"new console -n {excludedProcess} -o . --no-restore");
117+
var logDir = await RunDotnet($"new console -n {excludedProcess} -o . --no-restore -f net8.0");
118118
AssertNotInstrumented(agent, logDir);
119119

120120
var programCs = GetProgramCSThatMakesSpans();
@@ -152,7 +152,7 @@ public async Task DoesInstrumentAllowedProcesses(string allowedProcess)
152152

153153
using var agent = EnvironmentHelper.GetMockAgent(useTelemetry: true);
154154

155-
var logDir = await RunDotnet($"new console -n {allowedProcess} -o . --no-restore");
155+
var logDir = await RunDotnet($"new console -n {allowedProcess} -o . --no-restore -f net8.0");
156156
AssertNotInstrumented(agent, logDir);
157157
var programCs = GetProgramCSThatMakesSpans();
158158

@@ -186,7 +186,7 @@ public async Task InstrumentsDotNetTest()
186186

187187
using var agent = EnvironmentHelper.GetMockAgent(useTelemetry: true);
188188

189-
var logDir = await RunDotnet("new xunit -n instrumentation_test -o . --no-restore");
189+
var logDir = await RunDotnet("new xunit -n instrumentation_test -o . --no-restore -f net8.0");
190190
AssertNotInstrumented(agent, logDir);
191191

192192
// this _should_ be instrumented so we expect managed data.

0 commit comments

Comments
 (0)