Skip to content

Commit

Permalink
add expiry tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hock committed Nov 16, 2024
1 parent e38fe7c commit 8b8cc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/AdHoc.Locking.Test/AtomicFileLockTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8b8cc33

Please sign in to comment.