Skip to content

Commit

Permalink
More relaxed pauses for cleanup unittests on Windows (Linux and Mac w…
Browse files Browse the repository at this point in the history
…orked fine)
  • Loading branch information
alex-jitbit committed Nov 5, 2024
1 parent 9c4ddca commit 7ad2b99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UnitTests/EvictionCallbackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7ad2b99

Please sign in to comment.