Skip to content

Commit 325038a

Browse files
committed
fix some tests
1 parent f65b65e commit 325038a

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
@@ -928,7 +928,7 @@ public void ActivityTraceParentAndTraceStateFromHeaders()
928928
Headers = new HeaderDictionary()
929929
{
930930
{"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"},
931-
{"tracestate", "TraceState1"},
931+
{"tracestate", "TraceState=1"},
932932
{"baggage", "Key1=value1, Key2=value2"}
933933
}
934934
});
@@ -937,7 +937,7 @@ public void ActivityTraceParentAndTraceStateFromHeaders()
937937
Assert.Equal(ActivityIdFormat.W3C, Activity.Current.IdFormat);
938938
Assert.Equal("0123456789abcdef0123456789abcdef", Activity.Current.TraceId.ToHexString());
939939
Assert.Equal("0123456789abcdef", Activity.Current.ParentSpanId.ToHexString());
940-
Assert.Equal("TraceState1", Activity.Current.TraceStateString);
940+
Assert.Equal("TraceState=1", Activity.Current.TraceStateString);
941941

942942
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1");
943943
Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");

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 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' 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", "TraceState1"},
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("TraceState1", 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", "TraceState1"},
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("TraceState1", invocationActivity.TraceStateString);
278+
Assert.Equal("TraceState=1", invocationActivity.TraceStateString);
279279

280280
client.Dispose();
281281

0 commit comments

Comments
 (0)