aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /tests
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'tests')
-rw-r--r--tests/live_handoff.rs4
-rw-r--r--tests/support/mod.rs10
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/live_handoff.rs b/tests/live_handoff.rs
index 034e1e89..38e68a5a 100644
--- a/tests/live_handoff.rs
+++ b/tests/live_handoff.rs
@@ -985,7 +985,6 @@ fn live_handoff_preserves_pane_process_io() {
&api_socket,
serde_json::json!({"id":"test:handoff","method":"server.live_handoff","params":{}}),
));
- drop(spawned);
assert!(
wait_for_message_variant(
&mut client_stream,
@@ -995,6 +994,7 @@ fn live_handoff_preserves_pane_process_io() {
.unwrap(),
"connected client shell should receive live-handoff shutdown"
);
+ drop(spawned);
thread::sleep(Duration::from_millis(300));
wait_for_api(&api_socket, Duration::from_secs(10));
wait_for_socket(&client_socket, Duration::from_secs(5));
@@ -1359,7 +1359,7 @@ fn live_handoff_keeps_unmanaged_agent_name_bound_to_saved_session() {
fs::write(
&fake_pi,
format!(
- "#!/bin/sh\nexport HERDR_AGENT=pi\necho started > {}\nexec /bin/sleep 30\n",
+ "#!/bin/sh\nexport HERDR_AGENT=pi\necho started > {}\n/bin/sleep 30\n:\n",
started_marker.display()
),
)
diff --git a/tests/support/mod.rs b/tests/support/mod.rs
index f4ccebe8..cc29afe9 100644
--- a/tests/support/mod.rs
+++ b/tests/support/mod.rs
@@ -444,9 +444,13 @@ pub fn wait_for_message_variants(
timeout: Duration,
variants: &[u32],
) -> Result<bool, String> {
- stream
- .set_read_timeout(Some(Duration::from_millis(200)))
- .map_err(|e| e.to_string())?;
+ let read_timeout = Some(Duration::from_millis(200));
+ // Darwin can reject resetting the timeout after peer closure with queued data.
+ if stream.read_timeout().map_err(|e| e.to_string())? != read_timeout {
+ stream
+ .set_read_timeout(read_timeout)
+ .map_err(|e| e.to_string())?;
+ }
let deadline = Instant::now() + timeout;
while Instant::now() < deadline {
match read_server_message(stream) {