moving to dispose
This commit is contained in:
parent
31b15a427e
commit
01d41406b3
|
|
@ -236,11 +236,6 @@ namespace OpenTelemetry.Instrumentation.AspNetCore.Tests
|
|||
|
||||
Assert.Equal(expectedTraceId, activity.Context.TraceId);
|
||||
Assert.Equal(expectedSpanId, activity.ParentSpanId);
|
||||
Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(new TextMapPropagator[]
|
||||
{
|
||||
new TraceContextPropagator(),
|
||||
new BaggagePropagator(),
|
||||
}));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -338,6 +333,11 @@ namespace OpenTelemetry.Instrumentation.AspNetCore.Tests
|
|||
public void Dispose()
|
||||
{
|
||||
this.openTelemetrySdk?.Dispose();
|
||||
Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(new TextMapPropagator[]
|
||||
{
|
||||
new TraceContextPropagator(),
|
||||
new BaggagePropagator(),
|
||||
}));
|
||||
}
|
||||
|
||||
private static void WaitForProcessorInvocations(Mock<BaseProcessor<Activity>> activityProcessor, int invocationCount)
|
||||
|
|
|
|||
|
|
@ -184,11 +184,6 @@ namespace OpenTelemetry.Instrumentation.Http.Tests
|
|||
|
||||
Assert.Equal($"00/{activity.Context.TraceId}/{activity.Context.SpanId}/01", traceparents.Single());
|
||||
Assert.Equal("k1=v1,k2=v2", tracestates.Single());
|
||||
Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(new TextMapPropagator[]
|
||||
{
|
||||
new TraceContextPropagator(),
|
||||
new BaggagePropagator(),
|
||||
}));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -321,6 +316,11 @@ namespace OpenTelemetry.Instrumentation.Http.Tests
|
|||
{
|
||||
this.serverLifeTime?.Dispose();
|
||||
Activity.Current = null;
|
||||
Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(new TextMapPropagator[]
|
||||
{
|
||||
new TraceContextPropagator(),
|
||||
new BaggagePropagator(),
|
||||
}));
|
||||
}
|
||||
|
||||
private static void ActivityEnrichment(Activity activity, string method, object obj)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ namespace OpenTelemetry.Instrumentation.Http.Tests
|
|||
public void Dispose()
|
||||
{
|
||||
this.serverLifeTime?.Dispose();
|
||||
Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(new TextMapPropagator[]
|
||||
{
|
||||
new TraceContextPropagator(),
|
||||
new BaggagePropagator(),
|
||||
}));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -141,11 +146,6 @@ namespace OpenTelemetry.Instrumentation.Http.Tests
|
|||
Assert.Equal("k1=v1,k2=v2", tracestate);
|
||||
|
||||
parent.Stop();
|
||||
Sdk.SetDefaultTextMapPropagator(new CompositeTextMapPropagator(new TextMapPropagator[]
|
||||
{
|
||||
new TraceContextPropagator(),
|
||||
new BaggagePropagator(),
|
||||
}));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Reference in New Issue