mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 08:15:35 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
523d834eb8
commit
d2d3793f50
@@ -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}"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user