mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 06:54:40 +00:00
Use proper xunit single threading
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user