Merge pull request #1354 from trheyi/main
Refactor stress test and i18n translations for improved clarity and c…
This commit is contained in:
commit
506e6bf88e
2 changed files with 39 additions and 40 deletions
|
|
@ -90,8 +90,8 @@ func TestRealWorldMCPScenarios(t *testing.T) {
|
||||||
messageContent := ""
|
messageContent := ""
|
||||||
for _, msg := range response.Messages {
|
for _, msg := range response.Messages {
|
||||||
if content, ok := msg.Content.(string); ok {
|
if content, ok := msg.Content.(string); ok {
|
||||||
messageContent += content + "\n"
|
messageContent += content + "\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert.Contains(t, messageContent, "Health", "Message should mention health")
|
assert.Contains(t, messageContent, "Health", "Message should mention health")
|
||||||
assert.Contains(t, messageContent, "Tools", "Message should mention tools")
|
assert.Contains(t, messageContent, "Tools", "Message should mention tools")
|
||||||
|
|
@ -134,8 +134,8 @@ func TestRealWorldMCPScenarios(t *testing.T) {
|
||||||
messageContent := ""
|
messageContent := ""
|
||||||
for _, msg := range response.Messages {
|
for _, msg := range response.Messages {
|
||||||
if content, ok := msg.Content.(string); ok {
|
if content, ok := msg.Content.(string); ok {
|
||||||
messageContent += content + "\n"
|
messageContent += content + "\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert.Contains(t, messageContent, "Tools", "Message should mention tools")
|
assert.Contains(t, messageContent, "Tools", "Message should mention tools")
|
||||||
assert.Contains(t, messageContent, "Ping", "Message should mention ping")
|
assert.Contains(t, messageContent, "Ping", "Message should mention ping")
|
||||||
|
|
@ -187,8 +187,8 @@ func TestRealWorldMCPScenarios(t *testing.T) {
|
||||||
messageContent := ""
|
messageContent := ""
|
||||||
for _, msg := range response.Messages {
|
for _, msg := range response.Messages {
|
||||||
if content, ok := msg.Content.(string); ok {
|
if content, ok := msg.Content.(string); ok {
|
||||||
messageContent += content + "\n"
|
messageContent += content + "\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert.Contains(t, messageContent, "Workflow", "Message should mention workflow")
|
assert.Contains(t, messageContent, "Workflow", "Message should mention workflow")
|
||||||
assert.Contains(t, messageContent, "Tools", "Message should mention tools")
|
assert.Contains(t, messageContent, "Tools", "Message should mention tools")
|
||||||
|
|
@ -716,4 +716,3 @@ func getMemStats() uint64 {
|
||||||
runtime.ReadMemStats(&m)
|
runtime.ReadMemStats(&m)
|
||||||
return m.Alloc
|
return m.Alloc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,13 +72,13 @@ func init() {
|
||||||
"mcp.read_resource.description": "Read resource '%s' from MCP client '%s'",
|
"mcp.read_resource.description": "Read resource '%s' from MCP client '%s'",
|
||||||
|
|
||||||
// MCP: context/mcp.go - Tool operations
|
// MCP: context/mcp.go - Tool operations
|
||||||
"mcp.list_tools.label": "MCP: List Tools",
|
"mcp.list_tools.label": "MCP: List Tools",
|
||||||
"mcp.list_tools.description": "List tools from MCP client '%s'",
|
"mcp.list_tools.description": "List tools from MCP client '%s'",
|
||||||
"mcp.call_tool.label": "MCP: Call Tool",
|
"mcp.call_tool.label": "MCP: Call Tool",
|
||||||
"mcp.call_tool.description": "Call tool '%s' from MCP client '%s'",
|
"mcp.call_tool.description": "Call tool '%s' from MCP client '%s'",
|
||||||
"mcp.call_tools.label": "MCP: Call Tools",
|
"mcp.call_tools.label": "MCP: Call Tools",
|
||||||
"mcp.call_tools.description": "Call %d tools sequentially from MCP client '%s'",
|
"mcp.call_tools.description": "Call %d tools sequentially from MCP client '%s'",
|
||||||
"mcp.call_tools_parallel.label": "MCP: Call Tools (Parallel)",
|
"mcp.call_tools_parallel.label": "MCP: Call Tools (Parallel)",
|
||||||
"mcp.call_tools_parallel.description": "Call %d tools in parallel from MCP client '%s'",
|
"mcp.call_tools_parallel.description": "Call %d tools in parallel from MCP client '%s'",
|
||||||
|
|
||||||
// MCP: context/mcp.go - Prompt operations
|
// MCP: context/mcp.go - Prompt operations
|
||||||
|
|
@ -220,13 +220,13 @@ func init() {
|
||||||
"mcp.read_resource.description": "从 MCP 客户端 '%s' 读取资源 '%s'",
|
"mcp.read_resource.description": "从 MCP 客户端 '%s' 读取资源 '%s'",
|
||||||
|
|
||||||
// MCP: context/mcp.go - Tool operations
|
// MCP: context/mcp.go - Tool operations
|
||||||
"mcp.list_tools.label": "MCP: 列出工具",
|
"mcp.list_tools.label": "MCP: 列出工具",
|
||||||
"mcp.list_tools.description": "从 MCP 客户端 '%s' 列出工具",
|
"mcp.list_tools.description": "从 MCP 客户端 '%s' 列出工具",
|
||||||
"mcp.call_tool.label": "MCP: 调用工具",
|
"mcp.call_tool.label": "MCP: 调用工具",
|
||||||
"mcp.call_tool.description": "从 MCP 客户端 '%s' 调用工具 '%s'",
|
"mcp.call_tool.description": "从 MCP 客户端 '%s' 调用工具 '%s'",
|
||||||
"mcp.call_tools.label": "MCP: 调用工具",
|
"mcp.call_tools.label": "MCP: 调用工具",
|
||||||
"mcp.call_tools.description": "从 MCP 客户端 '%s' 顺序调用 %d 个工具",
|
"mcp.call_tools.description": "从 MCP 客户端 '%s' 顺序调用 %d 个工具",
|
||||||
"mcp.call_tools_parallel.label": "MCP: 调用工具(并行)",
|
"mcp.call_tools_parallel.label": "MCP: 调用工具(并行)",
|
||||||
"mcp.call_tools_parallel.description": "从 MCP 客户端 '%s' 并行调用 %d 个工具",
|
"mcp.call_tools_parallel.description": "从 MCP 客户端 '%s' 并行调用 %d 个工具",
|
||||||
|
|
||||||
// MCP: context/mcp.go - Prompt operations
|
// MCP: context/mcp.go - Prompt operations
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue