Skip to content

Commit

Permalink
Code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Jul 21, 2024
1 parent 8de1be5 commit c2f87d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions AsyncKeyedLock.Tests/AsyncKeyedLocker/OriginalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public void IsInUseRaceConditionCoverage()
asyncKeyedLocker.Lock("test");
releaser.IsNotInUse = true; // internal
Assert.False(asyncKeyedLocker.IsInUse("test"));
asyncKeyedLocker._dictionary.PoolingEnabled = false; // internal
Assert.False(asyncKeyedLocker.IsInUse("test"));
}

[Fact]
Expand All @@ -244,6 +246,8 @@ public void IsInUseKeyChangeRaceConditionCoverage()
asyncKeyedLocker.Lock("test");
releaser.Key = "test2"; // internal
Assert.False(asyncKeyedLocker.IsInUse("test"));
asyncKeyedLocker._dictionary.PoolingEnabled = false; // internal
Assert.True(asyncKeyedLocker.IsInUse("test"));
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion AsyncKeyedLock/AsyncKeyedLockDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal sealed class AsyncKeyedLockDictionary<TKey> : ConcurrentDictionary<TKey
{
public int MaxCount { get; private set; } = 1;
internal readonly AsyncKeyedLockPool<TKey> _pool;
internal bool PoolingEnabled { get; private set; }
public bool PoolingEnabled { get; internal set; }

public AsyncKeyedLockDictionary(AsyncKeyedLockOptions options) : base()
{
Expand Down

0 comments on commit c2f87d4

Please sign in to comment.