Skip to content

Commit b7f467e

Browse files
Fix test: testMcpDestructiveParamSetsDestructiveHint uses filtered service name
"AdminService" is excluded by isSystemService() so getCatalogTools().get(0) returned null, causing the NPE. Renamed to "DataManagementService". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bf3a403 commit b7f467e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/openapi/src/test/java/org/apache/axis2/openapi/McpCatalogGeneratorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,8 @@ public void testMcpIdempotentParamSetsIdempotentHint() throws Exception {
690690
* {@code mcpDestructive=true} maps to {@code destructiveHint: true}.
691691
*/
692692
public void testMcpDestructiveParamSetsDestructiveHint() throws Exception {
693-
AxisService svc = new AxisService("AdminService");
693+
// Use a non-system service name — "AdminService" is filtered by isSystemService()
694+
AxisService svc = new AxisService("DataManagementService");
694695
AxisOperation op = new InOutAxisOperation();
695696
op.setName(QName.valueOf("deleteAllData"));
696697
op.addParameter(new org.apache.axis2.description.Parameter("mcpDestructive", "true"));

0 commit comments

Comments
 (0)