From 8b8cc33e6d5f016ff10fa546210b0b831189d669 Mon Sep 17 00:00:00 2001 From: David Hock Date: Sat, 16 Nov 2024 01:03:02 +0100 Subject: [PATCH] add expiry tolerance --- test/AdHoc.Locking.Test/AtomicFileLockTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/AdHoc.Locking.Test/AtomicFileLockTests.cs b/test/AdHoc.Locking.Test/AtomicFileLockTests.cs index fdef507..bb8136d 100644 --- a/test/AdHoc.Locking.Test/AtomicFileLockTests.cs +++ b/test/AdHoc.Locking.Test/AtomicFileLockTests.cs @@ -74,7 +74,7 @@ public async Task TestTryAcquireAsync() (await myNewLock.TryAcquireAsync(cancellationToken)).Should().BeTrue(); (await otherLock.TryAcquireAsync(cancellationToken)).Should().BeFalse(); - await Task.Delay(newAtomic.ExpiryInterval, cancellationToken); // await expiration + await Task.Delay(newAtomic.ExpiryInterval * 1.25, cancellationToken); // await expiration (await otherLock.TryAcquireAsync(cancellationToken)).Should().BeTrue(); (await myNewLock.TryAcquireAsync(cancellationToken)).Should().BeFalse();