diff --git a/test/DeploymentHelpers/Common/RetryHelper.cs b/test/DeploymentHelpers/Common/RetryHelper.cs index ddae86ecfe..01d515d709 100644 --- a/test/DeploymentHelpers/Common/RetryHelper.cs +++ b/test/DeploymentHelpers/Common/RetryHelper.cs @@ -28,6 +28,7 @@ namespace DeploymentHelpers { if (cancellationToken.IsCancellationRequested) { + logger.LogInformation("Stopping retry as cancellation token is triggered."); break; } diff --git a/test/DeploymentHelpers/Deployers/IISExpressDeployer.cs b/test/DeploymentHelpers/Deployers/IISExpressDeployer.cs index 1e3ba2d89e..8119eff4e9 100644 --- a/test/DeploymentHelpers/Deployers/IISExpressDeployer.cs +++ b/test/DeploymentHelpers/Deployers/IISExpressDeployer.cs @@ -102,6 +102,7 @@ namespace DeploymentHelpers #endif _hostProcess = Process.Start(startInfo); + _hostProcess.EnableRaisingEvents = true; var hostExitTokenSource = new CancellationTokenSource(); _hostProcess.Exited += (sender, e) => { diff --git a/test/DeploymentHelpers/Deployers/MonoDeployer.cs b/test/DeploymentHelpers/Deployers/MonoDeployer.cs index 7917e86e7e..f32600b8a7 100644 --- a/test/DeploymentHelpers/Deployers/MonoDeployer.cs +++ b/test/DeploymentHelpers/Deployers/MonoDeployer.cs @@ -72,6 +72,7 @@ namespace DeploymentHelpers }; _hostProcess = Process.Start(startInfo); + _hostProcess.EnableRaisingEvents = true; var hostExitTokenSource = new CancellationTokenSource(); _hostProcess.Exited += (sender, e) => { diff --git a/test/DeploymentHelpers/Deployers/SelfHostDeployer.cs b/test/DeploymentHelpers/Deployers/SelfHostDeployer.cs index 2623c4ddff..d890dc9ee2 100644 --- a/test/DeploymentHelpers/Deployers/SelfHostDeployer.cs +++ b/test/DeploymentHelpers/Deployers/SelfHostDeployer.cs @@ -58,6 +58,7 @@ namespace DeploymentHelpers AddEnvironmentVariablesToProcess(startInfo); _hostProcess = Process.Start(startInfo); + _hostProcess.EnableRaisingEvents = true; var hostExitTokenSource = new CancellationTokenSource(); _hostProcess.Exited += (sender, e) => {