Skip to content
Prev Previous commit
Next Next commit
Ensure SelfLog will not tear into other tests
  • Loading branch information
Falco20019 committed Feb 20, 2025
commit 836854e609bcd7c038296fa1dc70aeb167ed8672
7 changes: 6 additions & 1 deletion test/Serilog.Sinks.File.Tests/RollingFileSinkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Serilog.Sinks.File.Tests;

public class RollingFileSinkTests
public class RollingFileSinkTests : IDisposable
{
private readonly ITestOutputHelper _testOutputHelper;

Expand All @@ -18,6 +18,11 @@ public RollingFileSinkTests(ITestOutputHelper testOutputHelper)
_testOutputHelper = testOutputHelper;
}

public void Dispose()
{
SelfLog.Disable();
}

[Fact]
public void LogEventsAreEmittedToTheFileNamedAccordingToTheEventTimestamp()
{
Expand Down