Skip to content

Commit 15d0f1b

Browse files
committed
fix
1 parent 325038a commit 15d0f1b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,13 +740,13 @@ public void ActivityParentIdAndBaggageReadFromHeaders()
740740
{
741741
Headers = new HeaderDictionary()
742742
{
743-
{"Request-Id", "ParentId1"},
743+
{"Request-Id", "ParentId1"}, // non-standard header, won't apply to Activity
744744
{"baggage", "Key1=value1, Key2=value2"}
745745
}
746746
});
747747
hostingApplication.CreateContext(features);
748748
Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName);
749-
Assert.Equal("ParentId1", Activity.Current.ParentId);
749+
Assert.Null(Activity.Current.ParentId);
750750
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1");
751751
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");
752752
}

src/Http/Http.Extensions/test/RequestDelegateGenerator/RequestDelegateCreationTests.KeyServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public async Task ThrowsForUnregisteredRequiredKeyService()
127127
var exception = await Assert.ThrowsAsync<InvalidOperationException>(
128128
async () => await endpoint.RequestDelegate(httpContext));
129129

130-
Assert.Equal("No keyed service for type 'Microsoft.AspNetCore.Http.Generators.Tests.TestService' has been registered.", exception.Message);
130+
Assert.Equal("No keyed service for type 'Microsoft.AspNetCore.Http.Generators.Tests.TestService' using key type 'System.String' has been registered.", exception.Message);
131131
}
132132

133133
[Fact]

src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.Activity.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public async Task HubMethodInvokesCreateActivities_ReadTraceHeaders()
132132
var headers = new Dictionary<string, string>
133133
{
134134
{"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"},
135-
{"tracestate", "TraceState=1"},
135+
{"tracestate", "tracestate=1"},
136136
{"baggage", "Key1=value1, Key2=value2"}
137137
};
138138

@@ -149,7 +149,7 @@ public async Task HubMethodInvokesCreateActivities_ReadTraceHeaders()
149149
Assert.Equal(ActivityIdFormat.W3C, invocationActivity.IdFormat);
150150
Assert.Equal("0123456789abcdef0123456789abcdef", invocationActivity.TraceId.ToHexString());
151151
Assert.Equal("0123456789abcdef", invocationActivity.ParentSpanId.ToHexString());
152-
Assert.Equal("TraceState=1", invocationActivity.TraceStateString);
152+
Assert.Equal("tracestate=1", invocationActivity.TraceStateString);
153153

154154
client.Dispose();
155155

@@ -262,7 +262,7 @@ public async Task StreamingHubMethodCreatesActivities_ReadTraceHeaders()
262262
var headers = new Dictionary<string, string>
263263
{
264264
{"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"},
265-
{"tracestate", "TraceState=1"},
265+
{"tracestate", "tracestate=1"},
266266
{"baggage", "Key1=value1, Key2=value2"}
267267
};
268268

@@ -275,7 +275,7 @@ public async Task StreamingHubMethodCreatesActivities_ReadTraceHeaders()
275275
Assert.Equal(ActivityIdFormat.W3C, invocationActivity.IdFormat);
276276
Assert.Equal("0123456789abcdef0123456789abcdef", invocationActivity.TraceId.ToHexString());
277277
Assert.Equal("0123456789abcdef", invocationActivity.ParentSpanId.ToHexString());
278-
Assert.Equal("TraceState=1", invocationActivity.TraceStateString);
278+
Assert.Equal("tracestate=1", invocationActivity.TraceStateString);
279279

280280
client.Dispose();
281281

0 commit comments

Comments
 (0)