Skip to content

Commit 57654b3

Browse files
committed
fix: increase SSH session timeout to 10 seconds for stability in CI environments
1 parent 221a7dc commit 57654b3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

versatiles_core/src/io/sftp_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ pub fn open_session(url: &Url, identity_file: Option<&Path>) -> Result<Session>
4141
// SSH handshake
4242
let mut session = Session::new()?;
4343
session.set_tcp_stream(tcp);
44-
// Use a much shorter timeout in tests so session teardown completes quickly.
45-
#[cfg(not(test))]
44+
// 10 s is generous for ordinary operations and prevents `Session(-9)`
45+
// ("API timeout expired") flakes on loaded CI runners — we saw 1 s
46+
// be insufficient for local in-process SFTP round-trips on macOS + GDAL.
47+
// Drop speed is not affected because keepalive is disabled in tests below.
4648
session.set_timeout(10_000);
47-
#[cfg(test)]
48-
session.set_timeout(1_000);
4949
session.handshake()?;
5050
// Keepalive causes session teardown to block for `api_timeout` per drop in tests
5151
// because the test server never acknowledges keepalive or channel-close replies.

0 commit comments

Comments
 (0)