Skip to content

Commit

Permalink
Removed unneeded tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Nov 10, 2024
1 parent 74caacb commit b99c2f2
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions AsyncKeyedLock.Tests/AsyncKeyedLocker/OriginalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,39 +523,6 @@ public void TestTimeoutOrNullBasicWithOutParameter()
Assert.False(asyncKeyedLocker.IsInUse("test"));
}

[Fact]
public void TestTimeoutBasicWithOutParameterAndCancellationToken()
{
var asyncKeyedLocker = new AsyncKeyedLocker<string>(o => { o.PoolSize = 0; });
using (var myLock = asyncKeyedLocker.Lock("test", 0, out var entered))
{
Assert.True(entered);
Assert.True(asyncKeyedLocker.IsInUse("test"));
using (asyncKeyedLocker.Lock("test", 0, out entered))
Assert.False(entered);
using (asyncKeyedLocker.Lock("test", TimeSpan.Zero, out entered))
Assert.False(entered);
Assert.True(asyncKeyedLocker.IsInUse("test"));
}
Assert.False(asyncKeyedLocker.IsInUse("test"));
}

[Fact]
public void TestTimeoutOrNullBasicWithOutParameterAndCancellationToken()
{
var asyncKeyedLocker = new AsyncKeyedLocker<string>(o => { o.PoolSize = 0; });
using (var myLock = asyncKeyedLocker.LockOrNull("test", 0))
{
Assert.NotNull(myLock);
Assert.True(asyncKeyedLocker.IsInUse("test"));
var entered = asyncKeyedLocker.LockOrNull("test", 0);
Assert.Null(entered);
entered = asyncKeyedLocker.LockOrNull("test", TimeSpan.Zero);
Assert.Null(entered);
}
Assert.False(asyncKeyedLocker.IsInUse("test"));
}

[Fact]
public async Task TestTimeout()
{
Expand Down

0 comments on commit b99c2f2

Please sign in to comment.