From 1c5bfb9ba20568ef76ec56313505267406dd9bc2 Mon Sep 17 00:00:00 2001 From: Violin Date: Thu, 16 Jul 2026 18:24:57 +0100 Subject: [PATCH] fix: increase file lock acquisition timeout to prevent flaky concurrent lock test timeouts on Windows --- plugins/violin_guard/core/storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/violin_guard/core/storage.py b/plugins/violin_guard/core/storage.py index fa8b1b1..1d4f2ca 100644 --- a/plugins/violin_guard/core/storage.py +++ b/plugins/violin_guard/core/storage.py @@ -44,8 +44,8 @@ def lock_file(path: Path) -> FileLock: # Blocking fallback: wait for the lock to free. fcntl.flock(fh.fileno(), fcntl.LOCK_EX) elif msvcrt is not None: - # msvcrt has no non-blocking mode; retry briefly. - deadline = time.monotonic() + 5.0 + # msvcrt has no non-blocking mode; retry with a generous timeout. + deadline = time.monotonic() + 20.0 while True: try: msvcrt.locking(fh.fileno(), msvcrt.LK_NBLCK, 1)