From badf3e9d478901aba59b534b4f393c5c64a12d68 Mon Sep 17 00:00:00 2001 From: kozabrada123 <59031733+kozabrada123@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:10:07 +0100 Subject: [PATCH] testing tests --- tests/gateway.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/gateway.rs b/tests/gateway.rs index c23408a..de78eb2 100644 --- a/tests/gateway.rs +++ b/tests/gateway.rs @@ -61,9 +61,11 @@ async fn test_gateway_authenticate() { gateway.send_identify(identify).await; + let current_time = std::time::Instant::now(); + tokio::select! { // Fail, we timed out waiting for it - () = safina_timer::sleep_for(Duration::from_secs(20)) => { + () = safina_timer::sleep_until(current_time + Duration::from_secs(20)) => { println!("Timed out waiting for event, failing.."); assert!(false); }