refactor: cleaning up some code
All checks were successful
deploy / deploy (push) Successful in 5m0s

This commit is contained in:
D. Moonfire 2024-03-08 13:45:59 -06:00
parent e9f7f4552d
commit e3e6174431
2 changed files with 17 additions and 5 deletions

View file

@ -65,11 +65,11 @@ public class PipelineManager
)
.ToArray();
var report = TimeSpan.FromSeconds(15);
TimeSpan report = TimeSpan.FromSeconds(15);
while (!Task.WaitAll(tasks, report))
{
var waiting = this.runners.Where(x => !x.IsFinished).ToList();
List<PipelineRunner> waiting = this.runners.Where(x => !x.IsFinished).ToList();
this.logger.Debug(
"Waiting for {Count:l} to finish running",
@ -82,7 +82,9 @@ public class PipelineManager
foreach (IGrouping<PipelineRunnerState, PipelineRunner>? state in states)
{
var statePipelines = state.OrderBy(x => x.Pipeline.ToString()).ToList();
List<PipelineRunner> statePipelines = state
.OrderBy(x => x.Pipeline.ToString())
.ToList();
this.logger.Verbose(
"Waiting for {Count:l} in {State}: {List:l}",
@ -111,7 +113,10 @@ public class PipelineManager
/// </summary>
public void Watch()
{
var watchableList = this.runners.Where(a => a.Pipeline is IWatchablePipeline).ToList();
List<PipelineRunner> watchableList = this.runners.Where(a =>
a.Pipeline is IWatchablePipeline
)
.ToList();
foreach (PipelineRunner pipeline in watchableList)
{
@ -149,7 +154,7 @@ public class PipelineManager
// registered with `AddDependency`.
foreach (PipelineRunner entry in this.runners)
{
var dependencies = entry.Pipeline.GetDependencies().ToList();
List<IPipeline> dependencies = entry.Pipeline.GetDependencies().ToList();
foreach (IPipeline dependency in dependencies)
{

View file

@ -29,8 +29,15 @@ public abstract class TestBase<TContext>
.CreateLogger();
}
/// <summary>
/// Gets the Serilog logger for test output. This is wrapped around the
/// XUnit output helper.
/// </summary>
protected Logger Logger { get; }
/// <summary>
/// Gets the output helper associated with the XUnit test.
/// </summary>
protected ITestOutputHelper Output { get; }
protected TContext CreateContext()