fix(tests): reduce timeout flakes in linux-sandbox and tui

This commit is contained in:
James Peter
2026-01-06 04:59:06 +10:00
parent eba53333ce
commit 9d5dbfc1df
2 changed files with 13 additions and 7 deletions
@@ -19,7 +19,7 @@ const SHORT_TIMEOUT_MS: u64 = 200;
const SHORT_TIMEOUT_MS: u64 = 5_000;
#[cfg(not(target_arch = "aarch64"))]
const LONG_TIMEOUT_MS: u64 = 1_000;
const LONG_TIMEOUT_MS: u64 = 2_000;
#[cfg(target_arch = "aarch64")]
const LONG_TIMEOUT_MS: u64 = 5_000;
+12 -6
View File
@@ -668,12 +668,18 @@ fn queued_exec_end_flushes_after_stream_clears() {
harness.force_stream_clear();
// Give the flush timers enough headroom under nextest parallelism.
std::thread::sleep(Duration::from_millis(400));
harness.flush_into_widget();
std::thread::sleep(Duration::from_millis(200));
harness.flush_into_widget();
let output = render_chat_widget_to_vt100(&mut harness, 80, 14);
let deadline = Instant::now() + Duration::from_secs(2);
let output = loop {
std::thread::sleep(Duration::from_millis(100));
harness.flush_into_widget();
let output = render_chat_widget_to_vt100(&mut harness, 80, 14);
if output.contains("queued") && !output.contains("Running...") {
break output;
}
if Instant::now() >= deadline {
break output;
}
};
assert!(
output.contains("queued"),
"exec output should render after the deferred end is delivered:\n{}",