Adding CoreCLR variation of test on selfhost
This commit is contained in:
parent
b53404596f
commit
59fad3bbb3
|
|
@ -46,6 +46,8 @@ namespace E2ETests
|
|||
public static Process StartApplication(HostType hostType, KreFlavor kreFlavor, string identityDbName)
|
||||
{
|
||||
string applicationPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, APP_RELATIVE_PATH));
|
||||
//Tweak the %PATH% to the point to the right KREFLAVOR
|
||||
Environment.SetEnvironmentVariable("PATH", SwitchPathToKreFlavor(kreFlavor));
|
||||
|
||||
if (hostType == HostType.Helios)
|
||||
{
|
||||
|
|
@ -86,12 +88,27 @@ namespace E2ETests
|
|||
};
|
||||
|
||||
var hostProcess = Process.Start(startInfo);
|
||||
Console.WriteLine("Started klr.exe. Process Id : {0}", hostProcess.Id);
|
||||
Console.WriteLine("Started {0}. Process Id : {1}", hostProcess.MainModule.FileName, hostProcess.Id);
|
||||
WaitTillDbCreated(identityDbName);
|
||||
|
||||
return hostProcess;
|
||||
}
|
||||
|
||||
private static string SwitchPathToKreFlavor(KreFlavor kreFlavor)
|
||||
{
|
||||
var pathValue = Environment.GetEnvironmentVariable("PATH");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Current %PATH% value : {0}", pathValue);
|
||||
|
||||
pathValue = (kreFlavor == KreFlavor.CoreClr) ?
|
||||
pathValue.Replace("KRE-svr50-", "KRE-svrc50-") :
|
||||
pathValue.Replace("KRE-svrc50-", "KRE-svr50-");
|
||||
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Setting %PATH% value to : {0}", pathValue);
|
||||
return pathValue;
|
||||
}
|
||||
|
||||
//In case of self-host application activation happens immediately unlike iis where activation happens on first request.
|
||||
//So in self-host case, we need a way to block the first request until the application is initialized. In MusicStore application's case,
|
||||
//identity DB creation is pretty much the last step of application setup. So waiting on this event will help us wait efficiently.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ namespace E2ETests
|
|||
[Theory]
|
||||
[InlineData(HostType.Helios, KreFlavor.DesktopClr, "http://localhost:5001/")]
|
||||
[InlineData(HostType.SelfHost, KreFlavor.DesktopClr, "http://localhost:5002/")]
|
||||
//[InlineData(HostType.Helios, KreFlavor.CoreClr, "http://localhost:5001/")]
|
||||
[InlineData(HostType.SelfHost, KreFlavor.CoreClr, "http://localhost:5002/")]
|
||||
public void SmokeTestSuite(HostType hostType, KreFlavor kreFlavor, string applicationBaseUrl)
|
||||
{
|
||||
var testStartTime = DateTime.Now;
|
||||
|
|
|
|||
Loading…
Reference in New Issue