You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2026/10/01 18:08:07 UTC
(shardingsphere) branch master updated: Fix line wrapping in MCP tool exception test (#40030)
This is an automated email from the ASF dual-hosted git repository.
terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e0d8a9d6632 Fix line wrapping in MCP tool exception test (#40030)
e0d8a9d6632 is described below
commit e0d8a9d66322d66ace869fe48b383b59a59f9a66
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Oct 2 02:08:00 2026 +0800
Fix line wrapping in MCP tool exception test (#40030)
---
.../transport/capability/tool/MCPToolSpecificationFactoryTest.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mcp/bootstrap/src/test/java/org/apache/shardingsphere/mcp/bootstrap/transport/capability/tool/MCPToolSpecificationFactoryTest.java b/mcp/bootstrap/src/test/java/org/apache/shardingsphere/mcp/bootstrap/transport/capability/tool/MCPToolSpecificationFactoryTest.java
index 14bef5ae1c5..075a95db4bc 100644
--- a/mcp/bootstrap/src/test/java/org/apache/shardingsphere/mcp/bootstrap/transport/capability/tool/MCPToolSpecificationFactoryTest.java
+++ b/mcp/bootstrap/src/test/java/org/apache/shardingsphere/mcp/bootstrap/transport/capability/tool/MCPToolSpecificationFactoryTest.java
@@ -143,8 +143,7 @@ class MCPToolSpecificationFactoryTest extends AbstractMCPToolSpecificationFactor
try (MockedStatic<ToolDefinitionRegistry> mockedToolDefinitionRegistry = mockStatic(ToolDefinitionRegistry.class)) {
MCPToolDefinition toolDefinition = mockSupportedTool(mockedToolDefinitionRegistry, createToolDescriptorWithoutOutputSchema("fixture_ping"));
IllegalStateException expectedException = new IllegalStateException("sensitive detail");
- mockedToolDefinitionRegistry.when(() -> ToolDefinitionRegistry.dispatch(any(MCPFeatureRuntimeRequestContext.class), eq(toolDefinition), eq(Map.of())))
- .thenThrow(expectedException);
+ mockedToolDefinitionRegistry.when(() -> ToolDefinitionRegistry.dispatch(any(MCPFeatureRuntimeRequestContext.class), eq(toolDefinition), eq(Map.of()))).thenThrow(expectedException);
McpError actual = assertThrows(McpError.class, () -> callTool(createToolSpecification(MCPTransportType.STDIO), createExchange(), "fixture_ping", Map.of()));
assertThat(actual.getJsonRpcError().code(), is(ErrorCodes.INTERNAL_ERROR));
assertThat(actual.getJsonRpcError().message(), is("Service is temporarily unavailable."));