Refactor stress test and i18n translations for improved clarity and consistency
- Cleaned up whitespace in the realworld_stress_test.go file to enhance readability. - Updated i18n translations for MCP tool operations, ensuring consistent formatting and clarity in both English and Chinese descriptions.
This commit is contained in:
parent
8dedd93a90
commit
8bf128e3ba
2 changed files with 39 additions and 40 deletions
|
|
@ -90,8 +90,8 @@ func TestRealWorldMCPScenarios(t *testing.T) {
|
|||
messageContent := ""
|
||||
for _, msg := range response.Messages {
|
||||
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, "Tools", "Message should mention tools")
|
||||
|
|
@ -134,8 +134,8 @@ func TestRealWorldMCPScenarios(t *testing.T) {
|
|||
messageContent := ""
|
||||
for _, msg := range response.Messages {
|
||||
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, "Ping", "Message should mention ping")
|
||||
|
|
@ -187,8 +187,8 @@ func TestRealWorldMCPScenarios(t *testing.T) {
|
|||
messageContent := ""
|
||||
for _, msg := range response.Messages {
|
||||
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, "Tools", "Message should mention tools")
|
||||
|
|
@ -716,4 +716,3 @@ func getMemStats() uint64 {
|
|||
runtime.ReadMemStats(&m)
|
||||
return m.Alloc
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,13 +72,13 @@ func init() {
|
|||
"mcp.read_resource.description": "Read resource '%s' from MCP client '%s'",
|
||||
|
||||
// MCP: context/mcp.go - Tool operations
|
||||
"mcp.list_tools.label": "MCP: List Tools",
|
||||
"mcp.list_tools.description": "List tools from MCP client '%s'",
|
||||
"mcp.call_tool.label": "MCP: Call Tool",
|
||||
"mcp.call_tool.description": "Call tool '%s' from MCP client '%s'",
|
||||
"mcp.call_tools.label": "MCP: Call Tools",
|
||||
"mcp.call_tools.description": "Call %d tools sequentially from MCP client '%s'",
|
||||
"mcp.call_tools_parallel.label": "MCP: Call Tools (Parallel)",
|
||||
"mcp.list_tools.label": "MCP: List Tools",
|
||||
"mcp.list_tools.description": "List tools from MCP client '%s'",
|
||||
"mcp.call_tool.label": "MCP: Call Tool",
|
||||
"mcp.call_tool.description": "Call tool '%s' from MCP client '%s'",
|
||||
"mcp.call_tools.label": "MCP: Call Tools",
|
||||
"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.description": "Call %d tools in parallel from MCP client '%s'",
|
||||
|
||||
// MCP: context/mcp.go - Prompt operations
|
||||
|
|
@ -220,13 +220,13 @@ func init() {
|
|||
"mcp.read_resource.description": "从 MCP 客户端 '%s' 读取资源 '%s'",
|
||||
|
||||
// MCP: context/mcp.go - Tool operations
|
||||
"mcp.list_tools.label": "MCP: 列出工具",
|
||||
"mcp.list_tools.description": "从 MCP 客户端 '%s' 列出工具",
|
||||
"mcp.call_tool.label": "MCP: 调用工具",
|
||||
"mcp.call_tool.description": "从 MCP 客户端 '%s' 调用工具 '%s'",
|
||||
"mcp.call_tools.label": "MCP: 调用工具",
|
||||
"mcp.call_tools.description": "从 MCP 客户端 '%s' 顺序调用 %d 个工具",
|
||||
"mcp.call_tools_parallel.label": "MCP: 调用工具(并行)",
|
||||
"mcp.list_tools.label": "MCP: 列出工具",
|
||||
"mcp.list_tools.description": "从 MCP 客户端 '%s' 列出工具",
|
||||
"mcp.call_tool.label": "MCP: 调用工具",
|
||||
"mcp.call_tool.description": "从 MCP 客户端 '%s' 调用工具 '%s'",
|
||||
"mcp.call_tools.label": "MCP: 调用工具",
|
||||
"mcp.call_tools.description": "从 MCP 客户端 '%s' 顺序调用 %d 个工具",
|
||||
"mcp.call_tools_parallel.label": "MCP: 调用工具(并行)",
|
||||
"mcp.call_tools_parallel.description": "从 MCP 客户端 '%s' 并行调用 %d 个工具",
|
||||
|
||||
// MCP: context/mcp.go - Prompt operations
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue