Visitar URL original
🧪 test(lease): give the age-out test a real-time margin (#814) · tox-dev/filelock@181b36b · GitHub
Skip to content

Commit 181b36b

Browse files
authored
🧪 test(lease): give the age-out test a real-time margin (#814)
1 parent 2c19af4 commit 181b36b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/test_soft_lease.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ def test_lease_supersedes_a_live_holder_once_its_claim_ages_out(marker: Path, mo
523523
encoding="utf-8",
524524
)
525525

526-
with _lease(marker) as contender:
526+
# The stepped clock ages the marker out on the second look; the real timeout only has to outlast two polls.
527+
with _lease(marker, timeout=30) as contender:
527528
assert contender.is_lock_held_by_us
528529
assert contender.token not in {None, "stalled"}
529530

0 commit comments

Comments
 (0)