Skip to content

Commit

Permalink
improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Jan 21, 2023
1 parent f1c8588 commit 900319f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ public void LogsCorrectlyAndStopsLoggingLater()
Console.WriteLine("Before");
var instance = LoggerExtractinator.CreateLoggerExtractinatorAndSetupConsoleRedirection();
Console.WriteLine("During");
Thread.Sleep(100);
int waitedXTimes = 0;
while(!instance.LogLines.Any())
{
waitedXTimes++;
Thread.Sleep(10);
}
instance.DestroyAndRevertConsoleOut();
Console.WriteLine("After");
Console.WriteLine($"After: {waitedXTimes}");

Thread.Sleep(100);
Assert.Single(instance.LogLines);
Assert.Single(instance.LogLinesEntry);

Expand Down

0 comments on commit 900319f

Please sign in to comment.