test(agent): close session input fixtures and share shutdown diagnostics
This commit is contained in:
1 parent
2756c6bb78
commit
90fcb7f903
3 files changed
+29
-27
No files matched your search
@@ -1,13 +1,12 @@
|
||||
"""Independent turns and internal controls retain their session inbox semantics."""
|
||||
|
||||
import asyncio
|
||||
import faulthandler
|
||||
import threading
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
from agent.session_helpers import run_session
|
||||
from agent.session_helpers import run_session, stop_loop
|
||||
from nanobot.agent.automation_turns import AutomationTurnError
|
||||
from nanobot.agent.loop import AgentLoop
|
||||
from nanobot.agent.tools.context import current_request_context
|
||||
@@ -705,14 +704,4 @@ async def test_queued_continuation_keeps_its_origin_after_another_chat_runs(loop
|
||||
replies.append((reply.chat_id, reply.metadata.get("message_id")))
|
||||
assert replies == [("chat-a", "message-a")]
|
||||
finally:
|
||||
loop.stop()
|
||||
try:
|
||||
await asyncio.wait_for(worker, timeout=3)
|
||||
except TimeoutError:
|
||||
# Native Windows CI has timed out after the routing assertions.
|
||||
# Preserve the deadline and expose the shielded storage drain.
|
||||
close_task = loop.sessions.state._close_task
|
||||
if close_task is not None:
|
||||
close_task.print_stack()
|
||||
faulthandler.dump_traceback()
|
||||
raise
|
||||
await stop_loop(loop, worker, timeout=3)
|
||||
Reference in new issue
Block a user