Skip to content

Commit c8d4575

Browse files
Remove debug code
Remove leftover debug code.
1 parent 032c62d commit c8d4575

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/W3CTraceContextTests.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ public W3CTraceContextTests(ITestOutputHelper output)
3535
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1026:Theory methods should use all of their parameters", Justification = "Need to use SkipUnlessEnvVarFoundTheory")]
3636
public void W3CTraceContextTestSuiteAsync(string value)
3737
{
38+
// See https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/default-trace-context-propagator
39+
DistributedContextPropagator.Current = DistributedContextPropagator.CreatePreW3CPropagator();
40+
3841
// configure SDK
3942
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
4043
.AddAspNetCoreInstrumentation()
4144
.Build();
4245

43-
#if NET10_0_OR_GREATER
44-
// See https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/default-trace-context-propagator
45-
System.Diagnostics.DistributedContextPropagator.Current = System.Diagnostics.DistributedContextPropagator.CreatePreW3CPropagator();
46-
#endif
47-
4846
var builder = WebApplication.CreateBuilder();
4947
using var app = builder.Build();
5048

@@ -81,15 +79,6 @@ public void W3CTraceContextTestSuiteAsync(string value)
8179

8280
this.output.WriteLine("[stderr]" + stderr);
8381
this.output.WriteLine("[stdout]" + stdout);
84-
this.output.WriteLine("[result]" + lastLine);
85-
86-
Console.WriteLine("[stderr]" + stderr);
87-
Console.WriteLine("[stdout]" + stdout);
88-
Console.WriteLine("[result]" + lastLine);
89-
90-
Thread.Sleep(5_000);
91-
92-
this.output.WriteLine("DONE");
9382

9483
// Assert on the last line
9584
Assert.StartsWith("OK", lastLine, StringComparison.Ordinal);
@@ -98,7 +87,6 @@ public void W3CTraceContextTestSuiteAsync(string value)
9887
public void Dispose()
9988
{
10089
this.httpClient.Dispose();
101-
Thread.Sleep(5_000);
10290
}
10391

10492
private static (string StdOut, string StdErr) RunCommand(string command, string args)

0 commit comments

Comments
 (0)