()
| 304 | |
| 305 | #[tokio::test] |
| 306 | async fn queue_full_increments_dropped() { |
| 307 | let bus = NotifyBus::new(2); // tiny cap |
| 308 | let t = tenant(1); |
| 309 | let (_, _rx) = bus.listen(t, "ch"); // don't drain |
| 310 | bus.notify(t, "ch", "a"); |
| 311 | bus.notify(t, "ch", "b"); // fills the queue |
| 312 | bus.notify(t, "ch", "c"); // should drop |
| 313 | assert_eq!(bus.total_dropped(), 1); |
| 314 | } |
| 315 | |
| 316 | #[tokio::test] |
| 317 | async fn unlisten_all() { |