From 18ea5f61847d58c4455f82159965088bfeb0bfd8 Mon Sep 17 00:00:00 2001 From: Godopu Date: Fri, 30 Oct 2026 00:23:49 +0900 Subject: [PATCH] test(reset): the submit-first test requires the reset to stay blocked on the exclusive admission (#78) A shared take also showed `pane_lock acquire --fd 7` for an instant, so the test passed with the old shared admission; it now matches the exclusive argv and checks the reset is still waiting a second later. Co-Authored-By: Claude Opus 5.5 --- tests/test_issue78_reset.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_issue78_reset.py b/tests/test_issue78_reset.py index dc9b2d2..fe6d3fa 100644 --- a/tests/test_issue78_reset.py +++ b/tests/test_issue78_reset.py @@ -1733,15 +1733,19 @@ def test_reset_waits_for_an_admitted_submit_and_sees_its_job(mam_sandbox: Path, stderr=subprocess.PIPE, text=True, ) + exclusive = "lib_py.pane_lock acquire --fd 7 --wait-env MAM_UPDATE_ADMISSION_WAIT_S" try: deadline = time.time() + 60 while time.time() < deadline: assert proc.poll() is None, proc.communicate() - if any("lib_py.pane_lock acquire --fd 7" in a for a in _descendant_args(proc.pid)): + if any(a.endswith(exclusive) for a in _descendant_args(proc.pid)): break time.sleep(0.1) else: pytest.fail("reset.sh never waited for the admission lock") + # Still blocked a second later: a shared take would have returned at once + time.sleep(1.0) + assert any(a.endswith(exclusive) for a in _descendant_args(proc.pid)) assert not (mam_sandbox / ".mam" / "reset-in-progress").exists() assert not (mam_sandbox / ".mam" / "loop-guard-active").exists() jobs_dir = mam_sandbox / ".mam" / "jobs"