Add expected test log exception to fix flaky test (#2958)

This commit is contained in:
BrennanConroy 2018-09-13 12:43:52 -07:00 committed by GitHub
parent 399ac267ca
commit 8a8d1e7d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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];