diff --git a/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/NonPooled/TestsForAsyncKeyedLock.cs b/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/NonPooled/TestsForAsyncKeyedLock.cs
index 4d01041..152a2a4 100644
--- a/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/NonPooled/TestsForAsyncKeyedLock.cs
+++ b/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/NonPooled/TestsForAsyncKeyedLock.cs
@@ -8,6 +8,8 @@ namespace AsyncKeyedLock.Tests.AsyncKeyedLocker.KeyedSemaphores.NonPooled;
///
/// Adapted from https://raw.githubusercontent.com/amoerie/keyed-semaphores/main/KeyedSemaphores.Tests/TestsForKeyedSemaphore.cs and https://raw.githubusercontent.com/amoerie/keyed-semaphores/main/KeyedSemaphores.Tests/TestsForKeyedSemaphoresCollection.cs
///
+[Collection("KeyedSemaphores Tests")]
+[CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class TestsForAsyncKeyedLock
{
private readonly ITestOutputHelper _output;
@@ -19,6 +21,8 @@ public TestsForAsyncKeyedLock(ITestOutputHelper output)
_output = output ?? throw new ArgumentNullException(nameof(output));
}
+ [Collection("KeyedSemaphores Tests")]
+ [CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class Async : TestsForAsyncKeyedLock
{
public Async(ITestOutputHelper output) : base(output) { }
@@ -93,6 +97,8 @@ async Task OccupyTheLockALittleBit(int key)
}
}
+ [Collection("KeyedSemaphores Tests")]
+ [CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class Sync : TestsForAsyncKeyedLock
{
public Sync(ITestOutputHelper output) : base(output) { }
diff --git a/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/Pooled/TestsForAsyncKeyedLock.cs b/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/Pooled/TestsForAsyncKeyedLock.cs
index 49b54fc..b855bdb 100644
--- a/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/Pooled/TestsForAsyncKeyedLock.cs
+++ b/AsyncKeyedLock.Tests/AsyncKeyedLocker/KeyedSemaphores/Pooled/TestsForAsyncKeyedLock.cs
@@ -8,6 +8,8 @@ namespace AsyncKeyedLock.Tests.AsyncKeyedLocker.KeyedSemaphores.Pooled;
///
/// Adapted from https://raw.githubusercontent.com/amoerie/keyed-semaphores/main/KeyedSemaphores.Tests/TestsForKeyedSemaphore.cs and https://raw.githubusercontent.com/amoerie/keyed-semaphores/main/KeyedSemaphores.Tests/TestsForAsyncKeyedLocker.cs
///
+[Collection("KeyedSemaphores Tests")]
+[CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class TestsForAsyncKeyedLock
{
private readonly ITestOutputHelper _output;
@@ -23,6 +25,8 @@ public TestsForAsyncKeyedLock(ITestOutputHelper output)
_output = output ?? throw new ArgumentNullException(nameof(output));
}
+ [Collection("KeyedSemaphores Tests")]
+ [CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class Async : TestsForAsyncKeyedLock
{
public Async(ITestOutputHelper output) : base(output) { }
@@ -97,6 +101,8 @@ async Task OccupyTheLockALittleBit(int key)
}
}
+ [Collection("KeyedSemaphores Tests")]
+ [CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class Sync : TestsForAsyncKeyedLock
{
public Sync(ITestOutputHelper output) : base(output) { }
diff --git a/AsyncKeyedLock.Tests/AsyncKeyedLocker/OriginalTests.cs b/AsyncKeyedLock.Tests/AsyncKeyedLocker/OriginalTests.cs
index 883199a..d194f93 100644
--- a/AsyncKeyedLock.Tests/AsyncKeyedLocker/OriginalTests.cs
+++ b/AsyncKeyedLock.Tests/AsyncKeyedLocker/OriginalTests.cs
@@ -1,11 +1,11 @@
using AsyncKeyedLock.Tests.Helpers;
using FluentAssertions;
-using ListShuffle;
-using System.Collections.Concurrent;
using Xunit;
namespace AsyncKeyedLock.Tests.AsyncKeyedLocker
{
+ [Collection("Original Tests")]
+ [CollectionDefinition("Original Tests", DisableParallelization = false)]
public class OriginalTests
{
[Fact]
@@ -644,561 +644,6 @@ public void TestTimeoutTryLock()
Assert.False(asyncKeyedLocker.IsInUse("test"));
}
- [Fact]
- public async Task BasicTest()
- {
- var locks = 5000;
- var concurrency = 50;
- var asyncKeyedLocker = new AsyncKeyedLocker