From 4eccdeeda65aff439f73f43b92c3ce8ef772ae39 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Sun, 4 Oct 2026 02:49:33 +0200 Subject: [PATCH] test(acceptance): retry a move while a mirror folder is busy syncing --- scripts/fuse-acceptance.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/fuse-acceptance.py b/scripts/fuse-acceptance.py index 503c117..a4aeefd 100755 --- a/scripts/fuse-acceptance.py +++ b/scripts/fuse-acceptance.py @@ -4161,12 +4161,21 @@ class MoveContext: self.pair = first.pair def move(self, *paths: Path) -> subprocess.CompletedProcess: - """`pdfs move`, bounded: a wedged mount must not hang the harness.""" + """`pdfs move`, bounded: a wedged mount must not hang the harness. + + A mirror's sync pass holds the folder, and the daemon refuses a move + that waited 5 s for it. A periodic pass over a folder earlier runs + filled can take longer, so the move is tried again until it ends.""" command = [self.pair.pdfs, "move", *(str(path) for path in paths)] - result = subprocess.run( - command, text=True, capture_output=True, timeout=self.pair.timeout - ) - detail = result.stderr.strip() or result.stdout.strip() + deadline = time.monotonic() + self.pair.timeout + while True: + result = subprocess.run( + command, text=True, capture_output=True, timeout=self.pair.timeout + ) + detail = result.stderr.strip() or result.stdout.strip() + if not (result.returncode and "busy syncing" in detail) or time.monotonic() > deadline: + break + time.sleep(2) if result.returncode and "different Proton Drive volumes" in detail: raise Skip(f"the locations are on different volumes: {detail}") return result