diff --git a/test/Seq.Extensions.Logging.Tests/Seq/Extensions/Logging/EnricherTests.cs b/test/Seq.Extensions.Logging.Tests/Seq/Extensions/Logging/EnricherTests.cs index 18e64fd..b492ed7 100644 --- a/test/Seq.Extensions.Logging.Tests/Seq/Extensions/Logging/EnricherTests.cs +++ b/test/Seq.Extensions.Logging.Tests/Seq/Extensions/Logging/EnricherTests.cs @@ -6,6 +6,7 @@ namespace Tests.Seq.Extensions.Logging; +[Collection("SelfLog")] public class EnricherTests { [Fact] diff --git a/test/Seq.Extensions.Logging.Tests/Serilog/Extensions/Logging/SerilogLoggerTests.cs b/test/Seq.Extensions.Logging.Tests/Serilog/Extensions/Logging/SerilogLoggerTests.cs index fe7ac69..f2973bc 100644 --- a/test/Seq.Extensions.Logging.Tests/Serilog/Extensions/Logging/SerilogLoggerTests.cs +++ b/test/Seq.Extensions.Logging.Tests/Serilog/Extensions/Logging/SerilogLoggerTests.cs @@ -13,6 +13,7 @@ namespace Tests.Serilog.Extensions.Logging; +[Collection("SelfLog")] public class SerilogLoggerTests { static SerilogLoggerTests() diff --git a/test/Seq.Extensions.Logging.Tests/Support/SelfLogCollection.cs b/test/Seq.Extensions.Logging.Tests/Support/SelfLogCollection.cs new file mode 100644 index 0000000..0ed12f4 --- /dev/null +++ b/test/Seq.Extensions.Logging.Tests/Support/SelfLogCollection.cs @@ -0,0 +1,12 @@ +using Xunit; + +namespace Tests.Support; + +/// +/// Tests in this collection share the process-global SelfLog state +/// (a single static output sink). Running them in parallel causes writes from +/// one test to be observed by another, producing spurious failures, so the +/// collection is serialized. +/// +[CollectionDefinition("SelfLog", DisableParallelization = true)] +public class SelfLogCollection { } \ No newline at end of file