Skip to content

Commit 2bd1a01

Browse files
fb
1 parent 6852ac7 commit 2bd1a01

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,19 +417,18 @@ public async Task IncompleteRequestBodyDoesNotLogAsApplicationError()
417417
&& context.EventId == badRequestEventId
418418
&& context.LogLevel == LogLevel.Debug)
419419
{
420-
badRequestLogged.SetResult();
420+
badRequestLogged.TrySetResult();
421421
}
422422
else if (context.LoggerName == "Microsoft.AspNetCore.Server.Kestrel"
423423
&& context.EventId.Id == appErrorEventId
424424
&& context.LogLevel > LogLevel.Debug)
425425
{
426-
appErrorLogged.SetResult();
426+
appErrorLogged.TrySetResult();
427427
}
428428
else if (context.LoggerName == "Microsoft.AspNetCore.Server.Kestrel.Connections"
429-
&& context.EventId == connectionStopEventId
430-
&& context.Message.Contains("stopped."))
429+
&& context.EventId == connectionStopEventId)
431430
{
432-
connectionStoppedLogged.SetResult();
431+
connectionStoppedLogged.TrySetResult();
433432
}
434433
};
435434

0 commit comments

Comments
 (0)