diff --git a/crates/voelin-core/tests/link_fake.rs b/crates/voelin-core/tests/link_fake.rs index ed9b394..a63c48e 100644 --- a/crates/voelin-core/tests/link_fake.rs +++ b/crates/voelin-core/tests/link_fake.rs @@ -272,9 +272,13 @@ async fn presence_follows_the_link_until_it_disconnects() { assert_eq!(state.server_uid.as_deref(), Some(SERVER_UID)); assert_eq!(state.presence_source, Some(Source::Voice)); + // Alice talks: a packet of her voice (the session derives who talks). The + // voice comes from the media path and a poke or an error from the push + // path, and the session orders the two paths in no way, so the test waits + // for the talking before it plays the others. + conn.play([voice_of(8)]); + h.next(|e| matches!(e, Event::Talking { client: 8, talking: true, .. }).then_some(())).await; conn.play([ - // Alice talks: a packet of her voice (the session derives who talks). - voice_of(8), LinkEvent::Poke { from: 8, from_uid: Some("alice=".into()), @@ -283,7 +287,6 @@ async fn presence_follows_the_link_until_it_disconnects() { }, LinkEvent::Error("move refused".into()), ]); - h.next(|e| matches!(e, Event::Talking { client: 8, talking: true, .. }).then_some(())).await; let poke = h .next(|e| match e { Event::Poke { from_name, message, blocked, .. } => Some((from_name, message, blocked)),