diff --git a/src/GreenDonut/test/Core.Tests/TaskCacheOwnerTests.cs b/src/GreenDonut/test/Core.Tests/TaskCacheOwnerTests.cs index 83fb5092d86..6ec8f895653 100644 --- a/src/GreenDonut/test/Core.Tests/TaskCacheOwnerTests.cs +++ b/src/GreenDonut/test/Core.Tests/TaskCacheOwnerTests.cs @@ -8,12 +8,13 @@ public class TaskCacheOwnerTests public void EnsureTaskCacheIsReused() { // arrange - var cacheOwner1 = new TaskCacheOwner(); + var pool = TaskCachePool.Create(); + var cacheOwner1 = new TaskCacheOwner(pool); var cache = cacheOwner1.Cache; cacheOwner1.Dispose(); // act - using var cacheOwner2 = new TaskCacheOwner(); + using var cacheOwner2 = new TaskCacheOwner(pool); // assert Assert.Same(cache, cacheOwner2.Cache); @@ -23,9 +24,11 @@ public void EnsureTaskCacheIsReused() public void EnsureNewCachesAreIssued() { // arrange + var pool = TaskCachePool.Create(); + // act - using var cacheOwner1 = new TaskCacheOwner(); - using var cacheOwner2 = new TaskCacheOwner(); + using var cacheOwner1 = new TaskCacheOwner(pool); + using var cacheOwner2 = new TaskCacheOwner(pool); // assert Assert.NotSame(cacheOwner1.Cache, cacheOwner2.Cache);