File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 11import anyio
22import pytest
3- from pydantic import AnyUrl
43
54from mcp .server .fastmcp import FastMCP
65from mcp .shared .memory import create_connected_server_and_client_session as create_session
76
8- _resource_name = "slow://slow_resource"
9-
107
118@pytest .mark .anyio
129async def test_messages_are_executed_concurrently_tools ():
@@ -64,7 +61,7 @@ async def sleep_tool():
6461 call_order .append ("tool_end" )
6562 return "done"
6663
67- @server .resource (_resource_name )
64+ @server .resource ("slow://slow_resource" )
6865 async def slow_resource ():
6966 # Wait for tool to start before setting the event
7067 await tool_started .wait ()
@@ -78,7 +75,7 @@ async def slow_resource():
7875 # Start the tool first (it will wait on event)
7976 tg .start_soon (client_session .call_tool , "sleep" )
8077 # Then the resource (it will set the event)
81- tg .start_soon (client_session .read_resource , AnyUrl (_resource_name ))
78+ tg .start_soon (client_session .read_resource , AnyUrl ("slow://slow_resource" ))
8279
8380 # Verify that both ran concurrently
8481 assert call_order == [
You can’t perform that action at this time.
0 commit comments