You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/shared/test_streamable_http.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1140,6 +1140,8 @@ async def run_tool():
1140
1140
metadata=ClientMessageMetadata(
1141
1141
resumption_token=captured_resumption_token,
1142
1142
)
1143
+
# We need to wait for the tool to send another message so this doesn't deadlock. Fixing is out of scope for this PR. More details in https://github.com/modelcontextprotocol/python-sdk/issues/860
1144
+
awaitanyio.sleep(0.2)
1143
1145
result=awaitsession.send_request(
1144
1146
types.ClientRequest(
1145
1147
types.CallToolRequest(
@@ -1153,13 +1155,14 @@ async def run_tool():
1153
1155
metadata=metadata,
1154
1156
)
1155
1157
1158
+
1156
1159
# We should get a complete result
1157
1160
assertlen(result.content) ==1
1158
1161
assertresult.content[0].type=="text"
1159
1162
assert"Completed"inresult.content[0].text
1160
1163
1161
1164
# We should have received the remaining notifications
1162
-
assertlen(captured_notifications) >0
1165
+
assertlen(captured_notifications) ==2
1163
1166
1164
1167
# Should not have the first notification
1165
1168
# Check that "Tool started" notification isn't repeated when resuming
0 commit comments