From 426e89d6fb10920bf43b0d5dcfcba2713c16c819 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 15 Aug 2023 05:31:03 -0400 Subject: [PATCH] Extend sleeps of coordinator CI tests The CI does now get past the first check to the second one, hence the addition of similar sleeps to the second and so on checks. --- tests/coordinator/src/tests/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/coordinator/src/tests/mod.rs b/tests/coordinator/src/tests/mod.rs index 89e273cf..b0b26ec5 100644 --- a/tests/coordinator/src/tests/mod.rs +++ b/tests/coordinator/src/tests/mod.rs @@ -91,6 +91,9 @@ async fn key_gen_test() { // Sleep for 20s to give everything processing time tokio::time::sleep(Duration::from_secs(20)).await; + if std::env::var("GITHUB_CI") == Ok("true".to_string()) { + tokio::time::sleep(Duration::from_secs(20)).await; + } for (i, processor) in processors.iter_mut().enumerate() { let mut commitments = (0 .. u8::try_from(COORDINATORS).unwrap()) .map(|l| (participant_from_i(l.into()), vec![l])) @@ -115,6 +118,9 @@ async fn key_gen_test() { } tokio::time::sleep(Duration::from_secs(20)).await; + if std::env::var("GITHUB_CI") == Ok("true".to_string()) { + tokio::time::sleep(Duration::from_secs(20)).await; + } for (i, processor) in processors.iter_mut().enumerate() { let i = participant_from_i(i); assert_eq!( @@ -143,7 +149,11 @@ async fn key_gen_test() { } // Sleeps for longer since we need to wait for a Substrate block as well + // TODO: Replace this with Substrate RPC checks and a much smaller sleep tokio::time::sleep(Duration::from_secs(60)).await; + if std::env::var("GITHUB_CI") == Ok("true".to_string()) { + tokio::time::sleep(Duration::from_secs(60)).await; + } let mut message = None; for processor in processors.iter_mut() { let msg = processor.recv_message().await;