Skip to content

Commit 6f217ce

Browse files
committed
test: add session error handling in test
1 parent 81f5c28 commit 6f217ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testcases/ground-to-cloud/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ async def call_add_tool():
3131
async with streamablehttp_client(mcp_url, headers={ 'Authorization': f'Bearer {token}' }) as (read_stream, write_stream, _):
3232
async with ClientSession(read_stream, write_stream) as session:
3333
# Initialize the session
34-
await session.initialize()
34+
try:
35+
await session.initialize()
36+
except Exception as e:
37+
print (f"Error when initializing session: {e}")
38+
raise e
3539

3640
# List available tools
3741
try:

0 commit comments

Comments
 (0)