Fix test server shutdown issues (#1554)

This commit is contained in:
Justin Kotalik 2018-10-25 10:30:45 -07:00 committed by GitHub
parent 044f613804
commit a9c5eb28d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -146,7 +146,14 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
public void Dispose()
{
HttpClient.Dispose();
WebCoreShutdown(false);
// WebCoreShutdown occasionally AVs
// This causes the dotnet test process to crash
// To avoid this, we have to wait to shutdown
// and pass in true to immediately shutdown the hostable web core
// Both of these seem to be required.
Thread.Sleep(100);
WebCoreShutdown(immediate: true);
WebCoreLock.Release();
}