Skip to content

Commit

Permalink
Change parallelization of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Aug 18, 2024
1 parent 1ac1cac commit a1943b6
Show file tree
Hide file tree
Showing 9 changed files with 946 additions and 904 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace AsyncKeyedLock.Tests.AsyncKeyedLocker.KeyedSemaphores.NonPooled;
/// <summary>
/// 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
/// </summary>
[Collection("KeyedSemaphores Tests")]
[CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class TestsForAsyncKeyedLock
{
private readonly ITestOutputHelper _output;
Expand All @@ -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) { }
Expand Down Expand Up @@ -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) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace AsyncKeyedLock.Tests.AsyncKeyedLocker.KeyedSemaphores.Pooled;
/// <summary>
/// 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
/// </summary>
[Collection("KeyedSemaphores Tests")]
[CollectionDefinition("KeyedSemaphores Tests", DisableParallelization = false)]
public class TestsForAsyncKeyedLock
{
private readonly ITestOutputHelper _output;
Expand All @@ -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) { }
Expand Down Expand Up @@ -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) { }
Expand Down
Loading

0 comments on commit a1943b6

Please sign in to comment.