3 writes to AppHostProcess
Aspire.Workload.Tests (3)
tests\Shared\WorkloadTesting\AspireProject.cs (3)
157AppHostProcess = new Process(); 263AppHostProcess = null; 382AppHostProcess = null;
27 references to AppHostProcess
Aspire.Workload.Tests (27)
TemplateAppFixture.cs (3)
60if (Project!.AppHostProcess is null || Project.AppHostProcess.HasExited || Project.AppExited?.Task.IsCompleted == true) 62throw new InvalidOperationException($"The app host process is not running. {Project.AppHostProcess?.HasExited}, {Project.AppExited?.Task.IsCompleted}");
tests\Shared\WorkloadTesting\AspireProject.cs (24)
36public bool IsRunning => AppHostProcess is not null && !AppHostProcess.TryGetHasExited(); 161AppHostProcess.StartInfo = new ProcessStartInfo(_buildEnv.DotNet, processArguments) 173AppHostProcess.StartInfo.Environment[item.Key] = item.Value; 177_testOutput.WriteLine($"Starting the process: {_buildEnv.DotNet} {processArguments} in {AppHostProcess.StartInfo.WorkingDirectory}"); 178AppHostProcess.OutputDataReceived += (sender, e) => 211AppHostProcess.ErrorDataReceived += (sender, e) => 236AppHostProcess.EnableRaisingEvents = true; 237AppHostProcess.Exited += appExitedCallback; 239AppHostProcess.EnableRaisingEvents = true; 241configureProcess?.Invoke(AppHostProcess.StartInfo); 244AppHostProcess.Start(); 245AppHostProcess.BeginOutputReadLine(); 246AppHostProcess.BeginErrorReadLine(); 262AppHostProcess.CloseAndKillProcessIfRunning(); 267reason = $"App exited before startup could complete with exit code {AppHostProcess.ExitCode}. It ran for {runTimeStopwatch.Elapsed} secs."; 370if (AppHostProcess is null) 377AppHostProcess.StandardInput.WriteLine("Stop"); 379await AppHostProcess.WaitForExitAsync(token).ConfigureAwait(false); 380AppHostProcess.WaitForExit(500); 381AppHostProcess.Dispose(); 388if (AppHostProcess is null) 447if (AppHostProcess is null || AppHostProcess.TryGetHasExited() || AppExited?.Task.IsCompleted == true)