Checking if the host process is actually running before attempting to kill

adding some more diagnostics in case of host process failed to start.
This commit is contained in:
Praburaj 2014-06-11 13:20:24 -07:00
parent e2b4842680
commit 6b1a61f208
1 changed files with 5 additions and 1 deletions

View File

@ -106,7 +106,7 @@ namespace E2ETests
}
finally
{
if (hostProcess != null)
if (hostProcess != null & !hostProcess.HasExited)
{
//Shutdown the host process
hostProcess.Kill();
@ -120,6 +120,10 @@ namespace E2ETests
Console.WriteLine("Successfully terminated host process with process Id '{0}'", hostProcess.Id);
}
}
else
{
Console.WriteLine("Host process already exited or never started successfully.");
}
DbUtils.DropDatabase(musicStoreDbName);
DbUtils.DropDatabase(musicStoreIdentityDbName);