We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 717c626 commit bc1c986Copy full SHA for bc1c986
tests/issues/test_188_concurrency.py
@@ -12,17 +12,21 @@
12
async def test_messages_are_executed_concurrently():
13
server = FastMCP("test")
14
event = anyio.Event()
15
+ tool_started = anyio.Event()
16
call_order = []
17
18
@server.tool("sleep")
19
async def sleep_tool():
20
call_order.append("waiting_for_event")
21
+ tool_started.set()
22
await event.wait()
23
call_order.append("tool_end")
24
return "done"
25
26
@server.resource(_resource_name)
27
async def slow_resource():
28
+ # Wait for tool to start before setting the event
29
+ await tool_started.wait()
30
event.set()
31
call_order.append("resource_end")
32
return "slow"
0 commit comments