We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6de0b3c commit 3612cc4Copy full SHA for 3612cc4
tests/tests_fabric/utilities/test_port_manager_process_safe.py
@@ -83,12 +83,13 @@ def test_file_lock_timeout(tmpdir):
83
assert lock1.acquire(timeout=1.0)
84
85
# Second lock should timeout
86
+ timeout_seconds = 0.5
87
start = time.time()
- assert not lock2.acquire(timeout=0.5)
88
+ assert not lock2.acquire(timeout=timeout_seconds)
89
elapsed = time.time() - start
90
91
# Should take approximately the timeout duration
- assert 0.4 < elapsed < 0.7
92
+ assert timeout_seconds * 0.8 < elapsed < timeout_seconds + 0.5
93
94
lock1.release()
95
0 commit comments