fix: clear subscriber map on shutdown

Even though it is not a case in the application, the interface could be
used externally
This commit is contained in:
2026-06-07 11:58:04 +03:00
parent 774db2d780
commit d9b52806c0
3 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -65,9 +65,10 @@ async def test_shutdown(event_bus: EventBus) -> None:
"""
must shutdown all subscriber queues on shutdown
"""
_, queue = await event_bus.subscribe()
subscriber_id, queue = await event_bus.subscribe()
await event_bus.shutdown()
assert subscriber_id not in event_bus._subscribers
with pytest.raises(QueueShutDown):
queue.get_nowait()