diff --git a/tests/processor/src/tests/key_gen.rs b/tests/processor/src/tests/key_gen.rs index c84bb7fb4..ee69086b7 100644 --- a/tests/processor/src/tests/key_gen.rs +++ b/tests/processor/src/tests/key_gen.rs @@ -48,7 +48,9 @@ pub(crate) async fn key_gen(coordinators: &mut [Coordinator]) -> KeyPair { .await; } // This takes forever on debug, as we use in these tests - tokio::time::sleep(core::time::Duration::from_secs(600)).await; + let ci_scaling_factor = + 1 + u64::from(u8::from(std::env::var("GITHUB_CI") == Ok("true".to_string()))); + tokio::time::sleep(core::time::Duration::from_secs(600 * ci_scaling_factor)).await; interact_with_all(coordinators, |participant, msg| match msg { messages::key_gen::ProcessorMessage::Participation { session: this_session, participation } => { assert_eq!(this_session, session); @@ -71,7 +73,7 @@ pub(crate) async fn key_gen(coordinators: &mut [Coordinator]) -> KeyPair { } } // This also takes a while on debug - tokio::time::sleep(core::time::Duration::from_secs(240)).await; + tokio::time::sleep(core::time::Duration::from_secs(240 * ci_scaling_factor)).await; interact_with_all(coordinators, |_, msg| match msg { messages::key_gen::ProcessorMessage::GeneratedKeyPair { session: this_session,