diff --git a/src/test/mod.rs b/src/test/mod.rs index 00af14e..8bc7d5f 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -6,7 +6,12 @@ mod test { use futures::future::join_all; use serde::{Deserialize, Serialize}; use test_log::test; - use tokio::{runtime::Builder, signal, sync::Mutex, time::sleep}; + use tokio::{ + runtime::Builder, + signal, + sync::Mutex, + time::{sleep, timeout}, + }; use tracing_test::traced_test; use crate::{ @@ -109,8 +114,7 @@ mod test { ) .await; tracing::debug!("Starting listener"); - listener.start_all_listeners().await; - signal::ctrl_c().await.expect("failed to listen for event"); + let out = timeout(Duration::from_secs(5), listener.start_all_listeners()).await; } #[test(tokio::test)]