aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/client_mode.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/client_mode.rs b/tests/client_mode.rs
index 06bd1123..8f326484 100644
--- a/tests/client_mode.rs
+++ b/tests/client_mode.rs
@@ -808,11 +808,18 @@ fn federated_launch_opens_local_directly_while_saved_ssh_is_unavailable() {
|| { read_output(&output).contains("Local") }
));
let mut input = client._master.as_ref().unwrap().take_writer().unwrap();
- input
- .write_all(b"printf 'LOCAL_%s\\n' DIRECT_READY\r")
- .unwrap();
+ // Input is gated until Local's active surface is ready, and that readiness can lag
+ // the first rendered frame (the unavailable remote must not extend the wait). Retry
+ // the write instead of assuming a single write lands, matching the recovered-Local
+ // path below.
assert!(wait_until(Duration::from_secs(10), Duration::from_millis(20), || {
- read_output(&output).contains("LOCAL_DIRECT_READY")
+ if read_output(&output).contains("LOCAL_DIRECT_READY") {
+ return true;
+ }
+ input
+ .write_all(b"printf 'LOCAL_%s\\n' DIRECT_READY\r")
+ .unwrap();
+ false
}), "Local must accept input without waiting for SSH (remote selected: {select_remote}): {}", read_output(&output));
let text = read_output(&output);
assert!(!text.contains("Local: connecting"), "{text}");