diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs index 33c85c9277a..03fe66aae56 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs @@ -354,7 +354,7 @@ public async Task HttpClientInstrumentationCorrelationAndBaggage() .Build()) { using var c = new HttpClient(); - using var r = await c.GetAsync("https://opentelemetry.io/").ConfigureAwait(false); + using var r = await c.GetAsync(this.url).ConfigureAwait(false); } Assert.Equal(5, activityProcessor.Invocations.Count); diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.netcore31.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.netcore31.cs index a843e9fab4b..9620e10335a 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.netcore31.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.netcore31.cs @@ -221,11 +221,11 @@ public async Task DebugIndividualTestAsync() [Fact] public async Task CheckEnrichmentWhenSampling() { - await CheckEnrichment(new AlwaysOffSampler(), 0).ConfigureAwait(false); - await CheckEnrichment(new AlwaysOnSampler(), 2).ConfigureAwait(false); + await CheckEnrichment(new AlwaysOffSampler(), 0, this.url).ConfigureAwait(false); + await CheckEnrichment(new AlwaysOnSampler(), 2, this.url).ConfigureAwait(false); } - private static async Task CheckEnrichment(Sampler sampler, int expect) + private static async Task CheckEnrichment(Sampler sampler, int expect, string url) { Counter = 0; var processor = new Mock>(); @@ -236,7 +236,7 @@ private static async Task CheckEnrichment(Sampler sampler, int expect) .Build()) { using var c = new HttpClient(); - using var r = await c.GetAsync("https://opentelemetry.io/").ConfigureAwait(false); + using var r = await c.GetAsync(url).ConfigureAwait(false); } Assert.Equal(expect, Counter);