Spawn test: report the seed's failure instead of timing out

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-03 00:23:36 +01:00
commit d07ddf1725

View file

@ -844,11 +844,14 @@ pub(crate) mod tests {
rig.port.push(Ok(author_in_hall("seed-1", &draft, &["a", "b"])));
rig.port.push(Ok(author("seed-2", &draft, &["c"])));
let world = eventually(async || {
let world = host.world.snapshot().await.unwrap();
(world.phase == WorldPhase::Active && rig.status(&begun.timeline).await.is_none()).then_some(world)
let status = eventually(async || {
let status = rig.status(&begun.timeline).await;
(status != Some(SeedStatus::Seeding)).then_some(status)
})
.await;
assert_eq!(status, None, "the seed settles Ready");
let world = host.world.snapshot().await.unwrap();
assert_eq!(world.phase, WorldPhase::Active);
let player = world.subjects.iter().find(|subject| subject.label == "Deru").unwrap();
assert_eq!(world.standing_place(player.id), Some("Hall"), "the player stands in the hall");
let others = world.subjects.iter().filter(|s| s.id != player.id && world.standing_place(s.id) == Some("Hall")).count();