diff --git a/crates/chatd/tests/discord.rs b/crates/chatd/tests/discord.rs index 14cd30d1..3b863421 100644 --- a/crates/chatd/tests/discord.rs +++ b/crates/chatd/tests/discord.rs @@ -13588,7 +13588,9 @@ fn an_activity_a_stage_and_a_soundboard_are_part_of_a_discord_voice_channel() { }; assert!(sounds.iter().any(|sound| sound.name == "Boom" && sound.default), "{sounds:?}"); assert!(sounds.iter().any(|sound| sound.name == "Quack" && sound.guild_id.as_deref() == Some("4000")), "{sounds:?}"); - assert!(!world.discord.frames_of(31).is_empty(), "the guild soundboard was asked for"); + // The guild's sounds were pushed before chatd asked for them, so chatd answered at once. The + // fake's reader thread records the frame it wrote a moment later. + wait("the guild soundboard request", || (world.discord.frames_of(31).iter().any(|frame| frame["d"]["guild_ids"] == json!(["4000"]))).then_some(())); assert!(matches!( world.ask(Request::PlaySoundboard { conversation: world.key("4202"), sound_id: "b".into(), guild_id: None }), Response::Ok