mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Fix for nested runtimes still using the relative url (#8947)
This commit is contained in:
parent
4d6d28a192
commit
fac0d59388
@ -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;
|
||||
};
|
||||
|
||||
@ -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)
|
||||
Loading…
x
Reference in New Issue
Block a user