Added more logs to unix domain sockets test (#10943)

- The current theory is that the tests are experiencing starvation so add more logs to see if if anything in the application is running between the FIN being received on the server side and application code receiving the notification that the pipe was completed.
- Detect OperationAborted to avoid the connection reset log.
This commit is contained in:
David Fowler 2019-06-06 10:46:37 -07:00 committed by GitHub
parent c18fc3d7ca
commit fcda7fd7d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -118,6 +118,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
// A call was made to UnbindAsync/DisposeAsync just return null which signals we're done
return null;
}
catch (SocketException e) when (e.SocketErrorCode == SocketError.OperationAborted)
{
// A call was made to UnbindAsync/DisposeAsync just return null which signals we're done
return null;
}
catch (SocketException)
{
// The connection got reset while it was in the backlog, so we try again.

View File

@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Connections.Features;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Testing;
using Xunit;
@ -49,6 +50,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
if (result.IsCompleted)
{
Logger.LogDebug("Application receive loop ending for connection {connectionId}.", connection.ConnectionId);
break;
}
@ -59,7 +61,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
}
catch (OperationCanceledException)
{
Logger.LogDebug("Graceful shutdown triggered for {connectionId}.", connection.ConnectionId);
}
}