diff --git a/BitFaster.Caching.UnitTests/Lfu/ConcurrentLfuTests.cs b/BitFaster.Caching.UnitTests/Lfu/ConcurrentLfuTests.cs index 8e461068..4cbcdacd 100644 --- a/BitFaster.Caching.UnitTests/Lfu/ConcurrentLfuTests.cs +++ b/BitFaster.Caching.UnitTests/Lfu/ConcurrentLfuTests.cs @@ -56,8 +56,8 @@ public void WhenKeyIsRequestedWithArgItIsCreatedAndCached() [Fact] public async Task WhenKeyIsRequesteItIsCreatedAndCachedAsync() { - var result1 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); - var result2 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); + var result1 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync); + var result2 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync); valueFactory.timesCalled.Should().Be(1); result1.Should().Be(result2); @@ -66,8 +66,8 @@ public async Task WhenKeyIsRequesteItIsCreatedAndCachedAsync() [Fact] public async Task WhenKeyIsRequestedWithArgItIsCreatedAndCachedAsync() { - var result1 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync, 9).ConfigureAwait(false); - var result2 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync, 17).ConfigureAwait(false); + var result1 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync, 9); + var result2 = await cache.GetOrAddAsync(1, valueFactory.CreateAsync, 17); valueFactory.timesCalled.Should().Be(1); result1.Should().Be(result2); diff --git a/BitFaster.Caching.UnitTests/Lru/ClassicLruTests.cs b/BitFaster.Caching.UnitTests/Lru/ClassicLruTests.cs index 9141759b..4b0b790f 100644 --- a/BitFaster.Caching.UnitTests/Lru/ClassicLruTests.cs +++ b/BitFaster.Caching.UnitTests/Lru/ClassicLruTests.cs @@ -195,8 +195,8 @@ public void WhenKeyIsRequestedWithArgItIsCreatedAndCached() [Fact] public async Task WhenKeyIsRequesteItIsCreatedAndCachedAsync() { - var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); - var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); + var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync); + var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync); valueFactory.timesCalled.Should().Be(1); result1.Should().Be(result2); @@ -205,8 +205,8 @@ public async Task WhenKeyIsRequesteItIsCreatedAndCachedAsync() [Fact] public async Task WhenKeyIsRequestedWithArgItIsCreatedAndCachedAsync() { - var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "x").ConfigureAwait(false); - var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "y").ConfigureAwait(false); + var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "x"); + var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "y"); valueFactory.timesCalled.Should().Be(1); result1.Should().Be(result2); @@ -227,8 +227,8 @@ public void WhenDifferentKeysAreRequestedValueIsCreatedForEach() [Fact] public async Task WhenDifferentKeysAreRequesteValueIsCreatedForEachAsync() { - var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); - var result2 = await lru.GetOrAddAsync(2, valueFactory.CreateAsync).ConfigureAwait(false); + var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync); + var result2 = await lru.GetOrAddAsync(2, valueFactory.CreateAsync); valueFactory.timesCalled.Should().Be(2); diff --git a/BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs b/BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs index 74f7800f..fc8c5a37 100644 --- a/BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs +++ b/BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs @@ -134,7 +134,7 @@ public void WhenItemIsAddedCountIsCorrect() public async Task WhenItemIsAddedCountIsCorrectAsync() { lru.Count.Should().Be(0); - await lru.GetOrAddAsync(0, valueFactory.CreateAsync).ConfigureAwait(false); + await lru.GetOrAddAsync(0, valueFactory.CreateAsync); lru.Count.Should().Be(1); } @@ -261,8 +261,8 @@ public void WhenKeyIsRequestedWithArgItIsCreatedAndCached() [Fact] public async Task WhenKeyIsRequestedItIsCreatedAndCachedAsync() { - var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); - var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); + var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync); + var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync); valueFactory.timesCalled.Should().Be(1); result1.Should().Be(result2); @@ -271,8 +271,8 @@ public async Task WhenKeyIsRequestedItIsCreatedAndCachedAsync() [Fact] public async Task WhenKeyIsRequestedWithArgItIsCreatedAndCachedAsync() { - var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "x").ConfigureAwait(false); - var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "y").ConfigureAwait(false); + var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "x"); + var result2 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync, "y"); valueFactory.timesCalled.Should().Be(1); result1.Should().Be(result2); @@ -293,8 +293,8 @@ public void WhenDifferentKeysAreRequestedValueIsCreatedForEach() [Fact] public async Task WhenDifferentKeysAreRequesteValueIsCreatedForEachAsync() { - var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync).ConfigureAwait(false); - var result2 = await lru.GetOrAddAsync(2, valueFactory.CreateAsync).ConfigureAwait(false); + var result1 = await lru.GetOrAddAsync(1, valueFactory.CreateAsync); + var result2 = await lru.GetOrAddAsync(2, valueFactory.CreateAsync); valueFactory.timesCalled.Should().Be(2);