mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-06-13 17:01:07 +00:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user