From 6c58bb0b6bcaf764b4a72309deaf1349f3c76245 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 1 Aug 2024 10:17:31 +0200 Subject: [PATCH] Double default when on potato CI, denote units in env var --- src/test_utils.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test_utils.rs b/src/test_utils.rs index 6a0fb925..472fcc83 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -294,10 +294,16 @@ where || { let mut diagnostics = Vec::new(); - let timeout = match std::env::var("CARGO_DENY_TEST_TIMEOUT") { - Ok(timeout) => timeout.parse().unwrap_or(30), - _ => 30, + let default = if std::env::var_os("CI").is_some() { + 60 + } else { + 30 }; + + let timeout = std::env::var("CARGO_DENY_TEST_TIMEOUT_SECS") + .ok() + .and_then(|ts| ts.parse().ok()) + .unwrap_or(default); let timeout = std::time::Duration::from_secs(timeout); let trx = crossbeam::channel::after(timeout);