Fix for nested runtimes still using the relative url (#8947)

This commit is contained in:
tofarr 2025-06-06 09:42:54 -06:00 committed by GitHub
parent 4d6d28a192
commit fac0d59388
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 31 deletions

View File

@ -17,6 +17,10 @@ export const useActiveConversation = () => {
useEffect(() => {
const conversation = userConversation.data;
OpenHands.setCurrentConversation(conversation || null);
}, [conversationId, userConversation.isFetched]);
}, [
conversationId,
userConversation.isFetched,
userConversation?.data?.status,
]);
return userConversation;
};

View File

@ -1,30 +0,0 @@
import pytest
from httpx import ConnectError
from mcp import McpError
from openhands.core.config.mcp_config import MCPSSEServerConfig
from openhands.mcp.client import MCPClient
@pytest.mark.asyncio
async def test_connect_sse_timeout():
"""Test that connect_http properly times out"""
client = MCPClient()
server = MCPSSEServerConfig(url='http://server1:8080')
# Test with a very short timeout
with pytest.raises(McpError, match='Timed out'):
await client.connect_http(server, timeout=0.001)
@pytest.mark.asyncio
async def test_connect_sse_invalid_url():
"""Test that connect_http hits error when server_url is invalid."""
client = MCPClient()
server = MCPSSEServerConfig(url='http://server1:8080')
# Test with larger timeout
with pytest.raises(ConnectError):
await client.connect_http(server, timeout=1)