diff --git a/tests/SharpCompress.Test/TestBase.cs b/tests/SharpCompress.Test/TestBase.cs index d8e5b587..6f6d314b 100644 --- a/tests/SharpCompress.Test/TestBase.cs +++ b/tests/SharpCompress.Test/TestBase.cs @@ -6,9 +6,11 @@ using System.Threading; using SharpCompress.Readers; using Xunit; +[assembly: CollectionBehavior(DisableTestParallelization = true)] + namespace SharpCompress.Test { - public class TestBase : IDisposable + public class TestBase { protected string SOLUTION_BASE_PATH = null; protected string TEST_ARCHIVES_PATH; @@ -270,12 +272,8 @@ namespace SharpCompress.Test return false; } - private static readonly object lockObject = new object(); - public TestBase() { - Monitor.Enter(lockObject); - var index = AppDomain.CurrentDomain.BaseDirectory.IndexOf("SharpCompress.Test", StringComparison.OrdinalIgnoreCase); SOLUTION_BASE_PATH = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory.Substring(0, index)); @@ -285,10 +283,5 @@ namespace SharpCompress.Test SCRATCH_FILES_PATH = Path.Combine(SOLUTION_BASE_PATH, "TestArchives", "Scratch"); SCRATCH2_FILES_PATH = Path.Combine(SOLUTION_BASE_PATH, "TestArchives", "Scratch2"); } - - public void Dispose() - { - Monitor.Exit(lockObject); - } } }