diff --git a/LazyCache.UnitTests/CachingServiceMemoryCacheProviderTests.cs b/LazyCache.UnitTests/CachingServiceMemoryCacheProviderTests.cs index 33c8302..5ce5090 100644 --- a/LazyCache.UnitTests/CachingServiceMemoryCacheProviderTests.cs +++ b/LazyCache.UnitTests/CachingServiceMemoryCacheProviderTests.cs @@ -834,7 +834,7 @@ public void GetOrAddWithImmediateExpirationAndCallbackInTheDelegateDoesExpireIte [Test] public async Task GetOrAddAsyncWithImmediateExpirationAndCallbackInTheDelegateDoesExpireItemsAndFireTheCallback() { - var millisecondsCacheDuration = 100; + var millisecondsCacheDuration = 1000; var callbackHasFired = false; var validResult = await sut.GetOrAddAsync( TestKey, @@ -845,7 +845,7 @@ public async Task GetOrAddAsyncWithImmediateExpirationAndCallbackInTheDelegateDo .WithImmediateAbsoluteExpiration(TimeSpan.FromMilliseconds(millisecondsCacheDuration)) .RegisterPostEvictionCallback((key, value, reason, state) => callbackHasFired = true)); // trigger expiry - Thread.Sleep(TimeSpan.FromMilliseconds(millisecondsCacheDuration + 50)); + Thread.Sleep(TimeSpan.FromMilliseconds(millisecondsCacheDuration + 1000)); Assert.That(validResult, Is.Not.Null); Assert.That(callbackHasFired, Is.True);