From a650996ecdcee9f7ab27d25682e16c74c5bec913 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 31 Aug 2024 09:31:13 +0100 Subject: [PATCH] fix(test): give actix more time to process message --- crates/cli/src/repo/tests/handlers/receive_ci_status.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/cli/src/repo/tests/handlers/receive_ci_status.rs b/crates/cli/src/repo/tests/handlers/receive_ci_status.rs index 8a45e48..d0c709d 100644 --- a/crates/cli/src/repo/tests/handlers/receive_ci_status.rs +++ b/crates/cli/src/repo/tests/handlers/receive_ci_status.rs @@ -51,15 +51,12 @@ async fn when_pending_should_recheck_ci_status() -> TestResult { git::forge::commit::Status::Pending, ))) .await?; + actix_rt::time::sleep(Duration::from_millis(9)).await; System::current().stop(); //then tracing::debug!(?log, ""); - log.read().map_err(|e| e.to_string()).map(|l| { - assert!(l - .iter() - .any(|message| message.contains("send: ValidateRepo"))); - })?; + log.require_message_containing("send: ValidateRepo")?; Ok(()) }