From 8a8d1e7d0a3e95f8d8cd5f504591538ca7366068 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Thu, 13 Sep 2018 12:43:52 -0700 Subject: [PATCH] Add expected test log exception to fix flaky test (#2958) --- .../HubConnectionTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs index 8934c538ff..c8798cdac7 100644 --- a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs @@ -398,9 +398,12 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests { bool ExpectedErrors(WriteContext writeContext) { - return (writeContext.LoggerName == nameof(Http.Connections.Client.Internal.ServerSentEventsTransport) || + var firstLogCheck = (writeContext.LoggerName == nameof(Http.Connections.Client.Internal.ServerSentEventsTransport) || writeContext.LoggerName == nameof(Http.Connections.Client.Internal.LongPollingTransport)) && writeContext.EventId.Name == "ErrorSending"; + var secondLogCheck = writeContext.LoggerName == nameof(Http.Connections.Client.HttpConnection) && + writeContext.EventId.Name == "TransportThrewExceptionOnStop"; + return firstLogCheck || secondLogCheck; } var protocol = HubProtocols[protocolName];