From 470b5f7d9ec4230caf34b8a526e2fa56cc75c6c0 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 6 Aug 2024 05:44:49 -0400 Subject: [PATCH] Increase time allowed for the DKG on the GH CI --- tests/processor/src/tests/key_gen.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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,