Skip to content

Commit 6c415c5

Browse files
committed
tests: Bump timeout for expect
This should reduce the flake rate. Signed-off-by: Colin Walters <[email protected]>
1 parent d81c395 commit 6c415c5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/tests-integration/src/system_reinstall.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ use rustix::fs::statfs;
66
use std::{
77
fs::{self},
88
path::Path,
9+
time::Duration,
910
};
1011

1112
use crate::install;
1213

13-
const TIMEOUT: u64 = 60000;
14+
/// A generous timeout since some CI runs may be slower
15+
const TIMEOUT: Duration = std::time::Duration::from_secs(5 * 60);
1416

1517
fn get_deployment_dir() -> Result<std::path::PathBuf> {
1618
let base_path = Path::new("/ostree/deploy/default/deploy");
@@ -58,7 +60,7 @@ pub(crate) fn run(image: &str, testargs: libtest_mimic::Arguments) -> Result<()>
5860

5961
let mut p: PtySession = rexpect::spawn(
6062
format!("/usr/bin/system-reinstall-bootc {image}").as_str(),
61-
Some(TIMEOUT),
63+
Some(TIMEOUT.as_millis().try_into().unwrap()),
6264
)?;
6365

6466
// Basic flow stdout verification
@@ -132,7 +134,7 @@ pub(crate) fn run(image: &str, testargs: libtest_mimic::Arguments) -> Result<()>
132134
// Run system-reinstall-bootc
133135
let mut p: PtySession = rexpect::spawn(
134136
format!("/usr/bin/system-reinstall-bootc {image}").as_str(),
135-
Some(TIMEOUT),
137+
Some(TIMEOUT.as_millis().try_into().unwrap()),
136138
)?;
137139

138140
p.exp_regex("Found only one user ([^:]+) with ([\\d]+) SSH authorized keys.")?;

0 commit comments

Comments
 (0)