Fixing a test bug resulting in a null reference

After starting the klr.exe process, Process.MainModule.FileName returns null if checked soon. Adding a thread sleep to solve this issue.
This commit is contained in:
Praburaj 2014-06-08 12:06:37 -07:00
parent 59fad3bbb3
commit c5f2b4054f
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ namespace E2ETests
};
var hostProcess = Process.Start(startInfo);
//Sometimes reading MainModule returns null if called immediately after starting process.
Thread.Sleep(1 * 1000);
Console.WriteLine("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id);
WaitTillDbCreated(identityDbName);