mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
fix(tests): reduce timeout flakes in linux-sandbox and tui
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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{}",
|
||||
|
||||
Reference in New Issue
Block a user