diff --git a/crates/voelin-core/src/ts/voice.rs b/crates/voelin-core/src/ts/voice.rs index 24fcd9d..f20f224 100644 --- a/crates/voelin-core/src/ts/voice.rs +++ b/crates/voelin-core/src/ts/voice.rs @@ -1650,8 +1650,10 @@ mod account_tests { events, )); let mut packet = [0; 2048]; - let (_, first) = - timeout(Duration::from_secs(5), server.recv_from(&mut packet)).await.unwrap().unwrap(); + let (_, first) = timeout(Duration::from_secs(5), server.recv_from(&mut packet)) + .await + .expect("the first handshake packet within 5 s") + .unwrap(); // A logout/clear notification must cancel the old socket and restart. account.send_replace(None); let second = timeout(Duration::from_secs(5), async { @@ -1663,11 +1665,14 @@ mod account_tests { } }) .await - .unwrap(); + .expect("a handshake packet from a new socket within 5 s of the account change"); assert_ne!(first, second); // Losing the account authority fails closed immediately, not after connect timeout. drop(account); - timeout(Duration::from_secs(2), task).await.unwrap().unwrap(); + timeout(Duration::from_secs(2), task) + .await + .expect("the connection to end within 2 s of the account source closing") + .unwrap(); assert!( matches!(received.recv().await, Some(LinkEvent::Disconnected(Some(reason))) if reason == "account source closed") );