Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Dec 19, 2024
1 parent b92df88 commit 7941ced
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,18 @@ public void Log_WhenAsyncFlush_StreamWriterIsCalledOnlyWhenLogLevelAllowsIt(LogL
.Setup(x => x.Create(It.IsAny<string>(), FileMode.CreateNew, FileAccess.Write, FileShare.Read))
.Returns(_mockStream.Object);

using FileLogger fileLogger = new(
// Ensures that the async flush is completed before the file is read
using (FileLogger fileLogger = new(
new(LogFolder, LogPrefix, fileName: FileName, syncFlush: false),
defaultLogLevel,
_mockClock.Object,
new SystemTask(),
_mockConsole.Object,
_mockFileSystem.Object,
_mockFileStreamFactory.Object);
fileLogger.Log(currentLogLevel, Message, null, Formatter, Category);

// Ensures that the async flush is completed before the file is read
fileLogger.Dispose();
_mockFileStreamFactory.Object))
{
fileLogger.Log(currentLogLevel, Message, null, Formatter, Category);
}

if (LogTestHelpers.IsLogEnabled(defaultLogLevel, currentLogLevel))
{
Expand Down

0 comments on commit 7941ced

Please sign in to comment.