MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / tenant_isolation

Function tenant_isolation

nodedb/src/control/notify_bus.rs:293–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291
292 #[tokio::test]
293 async fn tenant_isolation() {
294 let bus = NotifyBus::new(64);
295 let t1 = tenant(1);
296 let t2 = tenant(2);
297 let (_, mut rx1) = bus.listen(t1, "ch");
298 let (_, mut rx2) = bus.listen(t2, "ch");
299 bus.notify(t1, "ch", "for-t1");
300 // t1 receives; t2 does not.
301 assert!(rx1.try_recv().is_ok());
302 assert!(rx2.try_recv().is_err());
303 }
304
305 #[tokio::test]
306 async fn queue_full_increments_dropped() {

Callers

nothing calls this directly

Calls 3

tenantFunction · 0.70
listenMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected