Fix test server shutdown issues (#1554)
This commit is contained in:
parent
044f613804
commit
a9c5eb28d7
|
|
@ -146,7 +146,14 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
HttpClient.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();
|
WebCoreLock.Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue