From e8dfdab4501ae1098e93ffa891fcb8b81361419d Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 9 Jan 2024 08:34:08 -0500 Subject: [PATCH] Better handle database connection cancellation errors --- tests/Tgstation.Server.Tests/Live/HardFailLogger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Tests/Live/HardFailLogger.cs b/tests/Tgstation.Server.Tests/Live/HardFailLogger.cs index 2fc1d32da0..ffef40cdbe 100644 --- a/tests/Tgstation.Server.Tests/Live/HardFailLogger.cs +++ b/tests/Tgstation.Server.Tests/Live/HardFailLogger.cs @@ -27,7 +27,7 @@ namespace Tgstation.Server.Tests.Live && !((exception is BadHttpRequestException) && logMessage.Contains("Unexpected end of request content.")) // canceled request && !logMessage.StartsWith("Error disconnecting connection ") && !(logMessage.StartsWith("An exception occurred while iterating over the results of a query for context type") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException)) - && !(logMessage.StartsWith("An error occurred using the connection to database ") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException)) + && !(logMessage.Contains("An error occurred using the connection to database ") && (exception == null || (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException))) && !(logMessage.StartsWith("Error when dispatching 'OnConnectedAsync' on hub") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException)) && !(logMessage.StartsWith("An exception occurred in the database while saving changes for context type") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException))) || (logLevel == LogLevel.Critical && logMessage != "DropDatabase configuration option set! Dropping any existing database..."))