Skip to content

Commit 6d1f5b2

Browse files
committed
Fix owin tests
1 parent 817cc6a commit 6d1f5b2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/IntegrationTests/OwinIISTests.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ namespace IntegrationTests;
1111

1212
public class OwinIISTests
1313
{
14-
private static readonly HttpClient Client = new();
14+
private static readonly HttpClient Client = new()
15+
{
16+
DefaultRequestHeaders =
17+
{
18+
{ "traceparent", "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" } // send a traceparent header to verify that parent span id is propagated
19+
}
20+
};
1521

1622
public OwinIISTests(ITestOutputHelper output)
1723
{
@@ -84,7 +90,6 @@ public async Task SubmitMetrics()
8490

8591
private async Task CallWebEndpoint(int webPort)
8692
{
87-
Client.DefaultRequestHeaders.Add("traceparent", "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"); // send a traceparent header to verify that parent span id is propagated
8893
var response = await Client.GetAsync(new Uri($"http://localhost:{webPort}/test/")).ConfigureAwait(false);
8994
Assert.Equal(System.Net.HttpStatusCode.OK, response.StatusCode);
9095
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

0 commit comments

Comments
 (0)