nixpkgs/pkgs/applications/version-management/srvc/tests-no-timeout.patch

37 lines
1.1 KiB
Diff

--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -1,15 +1,13 @@
#![allow(dead_code)]
use std::path::PathBuf;
-use std::time::Duration;
use assert_cmd::Command;
#[cfg(unix)]
use rexpect::session::PtySession;
-pub fn cmd(timeout_millis: u64) -> Command {
+pub fn cmd(_: u64) -> Command {
let mut cmd = Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
- cmd.timeout(Duration::from_millis(timeout_millis));
cmd.env_remove("RUST_BACKTRACE");
cmd
}
@@ -19,14 +17,14 @@ pub fn spawn(
dir: &str,
args: Vec<&str>,
timestamp_override: u64,
- timeout_millis: u64,
+ _: u64,
) -> Result<PtySession, rexpect::errors::Error> {
let mut cmd = std::process::Command::new(env!("CARGO_BIN_EXE_sr"));
cmd.args(args);
cmd.current_dir(dir);
cmd.env("SR_TIMESTAMP_OVERRIDE", timestamp_override.to_string());
cmd.env_remove("RUST_BACKTRACE");
- Ok(rexpect::session::spawn_command(cmd, Some(timeout_millis))?)
+ rexpect::session::spawn_command(cmd, None)
}
pub fn remove_sink(dir: &str) -> Result<(), std::io::Error> {