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