From 7ad2b99dc78a773af94d2b9b07edb1e0c7ad9c09 Mon Sep 17 00:00:00 2001 From: alex-jitbit <33555768+alex-jitbit@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:05:17 +0200 Subject: [PATCH] More relaxed pauses for cleanup unittests on Windows (Linux and Mac worked fine) --- UnitTests/EvictionCallbackTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnitTests/EvictionCallbackTests.cs b/UnitTests/EvictionCallbackTests.cs index a743859..e49ded2 100644 --- a/UnitTests/EvictionCallbackTests.cs +++ b/UnitTests/EvictionCallbackTests.cs @@ -26,7 +26,7 @@ public async Task WhenItemExpires_EvictionCallbackFires() _cache.AddOrUpdate(key, "value", TimeSpan.FromMilliseconds(1)); // Act - await Task.Delay(110); // Wait for expiration + await Task.Delay(120); // Wait for expiration background job // Assert Assert.AreEqual(1, _evictedKeys.Count); @@ -72,7 +72,7 @@ public async Task AutomaticCleanup_FiresCallback() _cache.AddOrUpdate("key", "value", TimeSpan.FromMilliseconds(1)); // Act - await Task.Delay(110); // Wait for cleanup job + await Task.Delay(120); // Wait for cleanup job // Assert Assert.AreEqual(1, _evictedKeys.Count);