Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/contrib/strands/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def run(self, prompt: str) -> list[str]:

async def test_hooks(client: Client):
_AUDIT_LOG.clear()
task_queue = "test_hooks"
task_queue = f"test_hooks-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/strands/test_interrupt.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def run(self, prompt: str) -> str:


async def test_interrupt(client: Client):
task_queue = "test_interrupt"
task_queue = f"test_interrupt-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down
4 changes: 2 additions & 2 deletions tests/contrib/strands/test_interrupt_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def run(self, prompt: str) -> str:


async def test_in_workflow_tool_interrupt(client: Client):
task_queue = "test_in_workflow_tool_interrupt"
task_queue = f"test_in_workflow_tool_interrupt-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down Expand Up @@ -140,7 +140,7 @@ async def test_in_workflow_tool_interrupt(client: Client):
async def test_activity_tool_interrupt(client: Client):
global _activity_delete_calls
_activity_delete_calls = 0
task_queue = "test_activity_tool_interrupt"
task_queue = f"test_activity_tool_interrupt-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down
5 changes: 3 additions & 2 deletions tests/contrib/strands/test_invocation_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ async def run(self, prompt: str) -> str:

async def test_invocation_state_round_trip(client: Client):
_RECEIVED.clear()
task_queue = f"test_invocation_state-{uuid4()}"
plugin = StrandsPlugin(models={"recording": lambda: _RecordingModel()})

async with Worker(
client,
task_queue="test_invocation_state",
task_queue=task_queue,
workflows=[_InvocationStateWorkflow],
plugins=[plugin],
max_cached_workflows=0,
Expand All @@ -71,7 +72,7 @@ async def test_invocation_state_round_trip(client: Client):
_InvocationStateWorkflow.run,
"hi",
id=f"test_invocation_state_{uuid4()}",
task_queue="test_invocation_state",
task_queue=task_queue,
)

# The serializable key crosses the activity boundary; the non-serializable
Expand Down
8 changes: 4 additions & 4 deletions tests/contrib/strands/test_mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def run(self, prompt: str) -> str:


async def test_mcp(client: Client):
task_queue = "test_mcp"
task_queue = f"test_mcp-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down Expand Up @@ -125,7 +125,7 @@ async def run(self, prompt: str) -> str:

async def test_mcp_reuses_connection(client: Client):
"""Successive MCP tool calls reuse one cached worker-side connection."""
task_queue = "test_mcp_reuses_connection"
task_queue = f"test_mcp_reuses_connection-{uuid4()}"
# Count how often the worker opens a connection. One lazily-opened
# connection serves the list-tools discovery and both tool calls (1);
# reconnecting per call would make it more.
Expand Down Expand Up @@ -206,7 +206,7 @@ async def run(self, prompt: str) -> str:

async def test_mcp_connection_idle_timeout(client: Client):
"""A short idle timeout evicts the cached connection while the worker runs."""
task_queue = "test_mcp_connection_idle_timeout"
task_queue = f"test_mcp_connection_idle_timeout-{uuid4()}"
factory_calls = [0]

def counting_factory() -> MCPClient:
Expand Down Expand Up @@ -282,7 +282,7 @@ async def run(self, prompt: str) -> str:

async def test_mcp_lists_tools_each_turn_when_uncached(client: Client):
"""With cache_tools=False the tool list is re-fetched on every model call."""
task_queue = "test_mcp_lists_tools_each_turn_when_uncached"
task_queue = f"test_mcp_lists_tools_each_turn_when_uncached-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/strands/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def run(self, prompt: str) -> str:


async def test_model(client: Client):
task_queue = "test_model"
task_queue = f"test_model-{uuid4()}"
plugin = StrandsPlugin(models={"mock": lambda: MockModel(["Done!"])})

async with Worker(
Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/strands/test_model_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def run(self, prompt: str) -> str:


async def test_model_streaming(client: Client):
task_queue = "test_model_streaming"
task_queue = f"test_model_streaming-{uuid4()}"
plugin = StrandsPlugin(models={"mock": lambda: MockModel(["Done!"])})
workflow_id = f"test_model_streaming_{uuid4()}"

Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/strands/test_structured_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def run(self, prompt: str) -> PersonInfo:


async def test_structured_output(client: Client):
task_queue = "test_structured_output"
task_queue = f"test_structured_output-{uuid4()}"
plugin = StrandsPlugin(
models={
"mock": lambda: MockModel(
Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/strands/test_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def run(self, prompt: str) -> str:


async def test_tool(client: Client, tmp_path: Path):
task_queue = "test_tool"
task_queue = f"test_tool-{uuid4()}"
fixture = tmp_path / "greeting.txt"
fixture.write_text("hello\n")

Expand Down
Loading