Merge pull request #3280 from dotnet-maestro-bot/merge/release/2.2-to-master

[automated] Merge branch 'release/2.2' => 'master'
This commit is contained in:
BrennanConroy 2018-11-09 11:27:03 -08:00 committed by GitHub
commit 67a37f9db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -359,8 +359,16 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
[MemberData(nameof(HubProtocolsAndTransportsAndHubPaths))]
public async Task CanCloseStreamMethodEarly(string protocolName, HttpTransportType transportType, string path)
{
bool ExpectedErrors(WriteContext writeContext)
{
// Writing is not allowed after writer was completed.
// Can happen since we are closing the connection while the connection could still be writing the streaming data
return writeContext.LoggerName == typeof(HubConnectionContext).FullName &&
writeContext.EventId.Name == "FailedWritingMessage";
}
var protocol = HubProtocols[protocolName];
using (StartServer<Startup>(out var loggerFactory, out var fixture, LogLevel.Trace, $"{nameof(CanCloseStreamMethodEarly)}_{protocol.Name}_{transportType}_{path.TrimStart('/')}"))
using (StartServer<Startup>(out var loggerFactory, out var fixture, LogLevel.Trace, $"{nameof(CanCloseStreamMethodEarly)}_{protocol.Name}_{transportType}_{path.TrimStart('/')}", ExpectedErrors))
{
var connection = CreateHubConnection(fixture.Url, path, transportType, protocol, loggerFactory);
try