From d2d3793f50c99e79282ca6bf01f3982022bcedff Mon Sep 17 00:00:00 2001 From: Adam Hitchcock Date: Tue, 13 Oct 2026 04:25:45 -0700 Subject: [PATCH] test(daemon): a dead pane's refusal may come after it is reaped (#1170) send_input_to_a_dead_pane_answers_an_error raced the reaper: the session ending after Exited lets the server drop the dead pane, so the input can find no pane at all and answer "no such pane". Both are refusals. Co-authored-by: Claude Opus 5.5 --- crates/tty7-server/tests/pane_send_input.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/tty7-server/tests/pane_send_input.rs b/crates/tty7-server/tests/pane_send_input.rs index d712f1f9..7a0e8929 100644 --- a/crates/tty7-server/tests/pane_send_input.rs +++ b/crates/tty7-server/tests/pane_send_input.rs @@ -260,8 +260,11 @@ fn send_input_to_a_dead_pane_answers_an_error() { let err = panes .send_input(pane_id, b"echo too_late\r") .expect_err("input into an exited pane must fail"); + // The session's end lets the server reap the dead pane, so input that + // arrives after the reap finds no pane at all; both are refusals. + let err = err.to_string(); assert!( - err.to_string().contains("not running"), + err.contains("not running") || err.contains("no such pane"), "the refusal was {err}" ); }