mirror of
https://github.com/usestrix/strix.git
synced 2026-10-15 04:18:10 +00:00
fix(tests): give the root agent a real session in the pending-report wait test
test_wait_delivers_a_pending_report_before_checking_liveness asserted message_arrived against a root agent with no attached session, which only passed because consume_pending used to misreport delivery on a failed write. Now that it correctly returns (0, []) when there's no session to persist to, give the test a real SQLiteSession, matching every other agent-with-a-session test in this suite. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
ee31878773
commit
7bb32c29be
1 changed files with 6 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ import json
|
|||
from typing import TYPE_CHECKING, Any, cast
|
||||
|
||||
import pytest
|
||||
from agents.memory import SQLiteSession
|
||||
from agents.tool_context import ToolContext
|
||||
|
||||
from strix.core.agents import AgentCoordinator
|
||||
|
|
@ -162,8 +163,12 @@ async def test_wait_returns_at_once_when_no_child_can_answer() -> None:
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_wait_delivers_a_pending_report_before_checking_liveness() -> None:
|
||||
async def test_wait_delivers_a_pending_report_before_checking_liveness(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
coordinator = await _graph(interactive=False)
|
||||
session = SQLiteSession("root", tmp_path / "agents.db")
|
||||
await coordinator.attach_runtime("root", session=session)
|
||||
await coordinator.send("root", {"from": "child", "type": "completion", "content": "done"})
|
||||
await coordinator.set_status("child", "completed")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue