diff --git a/packages/cultmesh-rs/tests/rudp_subscription.rs b/packages/cultmesh-rs/tests/rudp_subscription.rs index b0c9162a..0118acb0 100644 --- a/packages/cultmesh-rs/tests/rudp_subscription.rs +++ b/packages/cultmesh-rs/tests/rudp_subscription.rs @@ -416,11 +416,15 @@ fn dropping_the_client_unsubscribes_each_live_id_and_stops_its_thread() { peer.subscribe_id(); peer.subscribe_id(); assert!(matches!(peer.next(), CultNetMessage::DatabaseUnsubscribe { subscription_id, .. } if subscription_id == "two")); + // An unsubscribed id is forgotten: not resent, not unsubscribed again. + client.resubscribe_all().unwrap(); + assert_eq!(peer.subscribe_id().1, "one"); let before = thread_count(); let started = Instant::now(); drop(client); assert!(started.elapsed() < Duration::from_secs(2), "drop joins promptly"); assert!(matches!(peer.next(), CultNetMessage::DatabaseUnsubscribe { subscription_id, .. } if subscription_id == "one")); + assert!(peer.received.recv_timeout(Duration::from_millis(300)).is_err(), "nothing else is sent"); if cfg!(target_os = "linux") { assert!(thread_count() < before, "the pump thread is gone with its handle"); }