StopServer before asserting TestSink (#1416)

This commit is contained in:
Pavel Krymets 2018-09-19 17:20:29 -07:00 committed by GitHub
parent 375d037946
commit b08b237927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -97,6 +97,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
var deploymentResult = await DeployAsync(deploymentParameters); var deploymentResult = await DeployAsync(deploymentParameters);
await deploymentResult.AssertStarts(); await deploymentResult.AssertStarts();
StopServer();
// Verify that in this scenario where.exe was invoked only once by shim and request handler uses cached value // Verify that in this scenario where.exe was invoked only once by shim and request handler uses cached value
Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe"))); Assert.Equal(1, TestSink.Writes.Count(w => w.Message.Contains("Invoking where.exe to find dotnet.exe")));
} }

View File

@ -184,6 +184,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
private void AssertLoadedVersion(string version) private void AssertLoadedVersion(string version)
{ {
StopServer();
Assert.Contains(TestSink.Writes, context => context.Message.Contains(version + @"\aspnetcorev2_outofprocess.dll")); Assert.Contains(TestSink.Writes, context => context.Message.Contains(version + @"\aspnetcorev2_outofprocess.dll"));
} }