Skip to content

Commit abab263

Browse files
committed
fix failing tests
Signed-off-by: Madhav Kandukuri <[email protected]>
1 parent f0435b2 commit abab263

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mcpgateway/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,7 @@ async def readiness_check(db: Session = Depends(get_db)):
22842284
try:
22852285
# Run the blocking DB check in a thread to avoid blocking the event loop
22862286
await asyncio.to_thread(db.execute, text("SELECT 1"))
2287+
return JSONResponse(content={"status": "ready"}, status_code=200)
22872288
except Exception as e:
22882289
error_message = f"Readiness check failed: {str(e)}"
22892290
logger.error(error_message)

tests/unit/mcpgateway/test_main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ async def dummy_post(*_args, **_kwargs):
909909
response = json.loads(data)
910910
assert response == {"jsonrpc": "2.0", "id": 1, "result": {}}
911911

912+
@patch("mcpgateway.main.update_url_protocol", new=lambda url: url)
912913
@patch("mcpgateway.main.session_registry.add_session")
913914
@patch("mcpgateway.main.session_registry.respond")
914915
@patch("mcpgateway.main.SSETransport")

0 commit comments

Comments
 (0)