mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-10-30 21:13: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:
1 parent
774db2d780
commit
d9b52806c0
3 files changed
+6
-2
No files matched your search
@@ -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