From c6de61b520f80f5af5b5e69769f8658230901e9e Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 10 Aug 2016 11:50:04 -0700 Subject: [PATCH] Addressed feedback --- .../Common/DeploymentParameters.cs | 2 +- .../Deployers/ApplicationDeployer.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.Testing/Common/DeploymentParameters.cs b/src/Microsoft.AspNetCore.Server.Testing/Common/DeploymentParameters.cs index 8ff17cdf24..241f53dd1e 100644 --- a/src/Microsoft.AspNetCore.Server.Testing/Common/DeploymentParameters.cs +++ b/src/Microsoft.AspNetCore.Server.Testing/Common/DeploymentParameters.cs @@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.Testing /// public bool PublishApplicationBeforeDeployment { get; set; } - public bool DeletePublishedApplicationOnDispose { get; set; } = true; + public bool PreservePublishedApplicationForDebugging { get; set; } = false; public ApplicationType ApplicationType { get; set; } diff --git a/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs b/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs index 17341f06d9..d9ae18a01a 100644 --- a/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.Testing/Deployers/ApplicationDeployer.cs @@ -82,7 +82,13 @@ namespace Microsoft.AspNetCore.Server.Testing protected void CleanPublishedOutput() { - if (DeploymentParameters.DeletePublishedApplicationOnDispose) + if (DeploymentParameters.PreservePublishedApplicationForDebugging) + { + Logger.LogWarning( + "Skipping deleting the locally published folder as property " + + $"'{nameof(DeploymentParameters.PreservePublishedApplicationForDebugging)}' is set to 'true'."); + } + else { try { @@ -94,12 +100,6 @@ namespace Microsoft.AspNetCore.Server.Testing Logger.LogWarning($"Failed to delete directory : {exception.Message}"); } } - else - { - Logger.LogWarning( - "Skipping deleting the locally published folder as property " + - $"'{nameof(DeploymentParameters.DeletePublishedApplicationOnDispose)}' is set to 'false'."); - } } protected void ShutDownIfAnyHostProcess(Process hostProcess)