test: separate ssh cancellation from timeout scheduling

refs #4721
This commit is contained in:
Jonathan Liebig
2026-10-14 02:09:22 +02:00
parent c61b9f5b2a
commit 4b818477fd
+7 -1
View File
@@ -436,7 +436,13 @@ pub(in crate::remote) mod tests {
let error = wait_with_output_timeout(
child,
Some(vec![b'x'; 1024 * 1024]),
Duration::from_millis(200),
// Test cancellation independently of the scheduler's ability
// to run its thread within the timeout branch's 100 ms margin.
if cancel {
Duration::from_secs(5)
} else {
Duration::from_millis(200)
},
stopped,
)
.unwrap_err();