50 references to LogMessages
InMemory.FunctionalTests (50)
ConnectionMiddlewareTests.cs (1)
265
Assert.Contains(
LogMessages
, m => m.Message.Contains("Unhandled exception while processing " + connectionId + "."));
Http2\Http2ConnectionTests.cs (10)
39
Assert.Equal(0,
LogMessages
.Count(m => m.EventId.Name == "Http2MaxConcurrentStreamsReached"));
43
Assert.Equal(1,
LogMessages
.Count(m => m.EventId.Name == "Http2MaxConcurrentStreamsReached"));
48
Assert.Equal(1,
LogMessages
.Count(m => m.EventId.Name == "Http2MaxConcurrentStreamsReached"));
1351
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
5087
Assert.Single(
LogMessages
, m => m.Exception is ConnectionResetException);
5100
Assert.DoesNotContain(
LogMessages
, m => m.Exception is ConnectionResetException);
5306
Assert.All(
LogMessages
, w => Assert.InRange(w.LogLevel, LogLevel.Trace, LogLevel.Debug));
5308
var logMessage =
LogMessages
.Single(m => m.EventId == 20);
5326
var logMessage =
LogMessages
.Single(m => m.LogLevel >= LogLevel.Information);
5361
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
Http2\Http2StreamTests.cs (7)
1350
Assert.Contains(
LogMessages
, m => m.Exception?.Message.Contains("Response Content-Length mismatch: too many bytes written (12 of 11).") ?? false);
1423
Assert.Contains(
LogMessages
, m => m.Exception?.Message.Contains(CoreStrings.FormatTooFewBytesWritten(0, 11)) ?? false);
1926
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
2013
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
2076
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
3111
Assert.Contains(
LogMessages
, m => (m.Exception?.Message.Contains("App Faulted") ?? false) && m.LogLevel == LogLevel.Error);
5878
Assert.Contains(
LogMessages
, m => m.Message.Equals("One or more of the following response headers have been removed because they are invalid for HTTP/2 and HTTP/3 responses: 'Connection', 'Transfer-Encoding', 'Keep-Alive', 'Upgrade' and 'Proxy-Connection'."));
Http2\Http2TestBase.cs (2)
1324
var message = Assert.Single(
LogMessages
, m => m.Exception is TException);
1346
Assert.Contains(
LogMessages
, m => m.Exception?.Message.Contains(expectedErrorMessage) ?? false);
Http3\Http3StreamTests.cs (5)
675
Assert.Contains(
LogMessages
, m => m.Message.Equals("One or more of the following response headers have been removed because they are invalid for HTTP/2 and HTTP/3 responses: 'Connection', 'Transfer-Encoding', 'Keep-Alive', 'Upgrade' and 'Proxy-Connection'."));
2557
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
2630
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
2685
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
2874
Assert.Contains(
LogMessages
, m => m.Message.Contains("the application completed without reading the entire request body."));
Http3\Http3TestBase.cs (2)
133
Assert.Contains(
LogMessages
, m => m.Exception?.Message.Contains(expectedErrorMessage) ?? false);
141
var message = Assert.Single(
LogMessages
, m => m.Exception != null && exceptionType.IsAssignableFrom(m.Exception.GetType()));
HttpProtocolSelectionTests.cs (1)
94
Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error
RequestTests.cs (1)
1894
Assert.DoesNotContain(
LogMessages
, m => m.LogLevel >= LogLevel.Warning);
ResponseDrainingTests.cs (1)
76
Assert.Single(
LogMessages
, w => w.EventId.Id == 28 && w.LogLevel <= LogLevel.Debug);
ResponseTests.cs (20)
939
var logMessage = Assert.Single(
LogMessages
, message => message.EventId.Name == "ConnectionHeadResponseBodyWrite");
982
var logMessage = Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error);
1021
var logMessage = Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error);
1061
var logMessage = Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error);
1096
var logMessage = Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error);
1294
var error =
LogMessages
.Where(message => message.LogLevel == LogLevel.Error);
1332
Assert.DoesNotContain(
LogMessages
, message => message.LogLevel == LogLevel.Error);
1368
Assert.DoesNotContain(
LogMessages
, message => message.LogLevel == LogLevel.Error);
1404
Assert.DoesNotContain(
LogMessages
, message => message.LogLevel == LogLevel.Error);
2028
Assert.Contains(
LogMessages
, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException
2079
while (
LogMessages
.TryDequeue(out var message))
2145
Assert.Contains(
LogMessages
, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException
2464
Assert.Equal(2,
LogMessages
.Where(message => message.LogLevel == LogLevel.Error).Count());
2524
Assert.Equal(2,
LogMessages
.Where(message => message.LogLevel == LogLevel.Error).Count());
2664
Assert.Equal(2,
LogMessages
.Where(message => message.LogLevel == LogLevel.Error).Count());
2711
Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error);
2756
Assert.Single(
LogMessages
, message => message.LogLevel == LogLevel.Error);
2789
Assert.DoesNotContain(
LogMessages
, message => message.LogLevel == LogLevel.Error);
2839
Assert.Single(
LogMessages
.Where(m => m.Message.Contains(CoreStrings.ConnectionAbortedByApplication)));
2874
Assert.Single(
LogMessages
.Where(m => m.Message.Contains("The connection was aborted by the application via IConnectionLifetimeFeature.Abort().")));