From 4b818477fd0ecd0dc10fea9276f678d91f80f6df Mon Sep 17 00:00:00 2001 From: Jonathan Liebig Date: Wed, 14 Oct 2026 02:09:22 +0200 Subject: [PATCH] test: separate ssh cancellation from timeout scheduling refs #4721 --- src/remote/process.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/remote/process.rs b/src/remote/process.rs index 96bca8e46..1861f5900 100644 --- a/src/remote/process.rs +++ b/src/remote/process.rs @@ -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();