Skip to content

Commit 87409d3

Browse files
committed
fix broken tests
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
1 parent d23bfde commit 87409d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mcp-test/src/main/java/io/modelcontextprotocol/client/AbstractMcpAsyncClientTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,8 @@ void testAddRoot() {
486486
void testAddRootWithNullValue() {
487487
withClient(createMcpTransport(), mcpAsyncClient -> {
488488
StepVerifier.create(mcpAsyncClient.addRoot(null))
489-
.consumeErrorWith(e -> assertThat(e).isInstanceOf(McpError.class).hasMessage("Root must not be null"))
489+
.consumeErrorWith(e -> assertThat(e).isInstanceOf(IllegalArgumentException.class)
490+
.hasMessage("Root must not be null"))
490491
.verify();
491492
});
492493
}
@@ -505,7 +506,7 @@ void testRemoveRoot() {
505506
void testRemoveNonExistentRoot() {
506507
withClient(createMcpTransport(), mcpAsyncClient -> {
507508
StepVerifier.create(mcpAsyncClient.removeRoot("nonexistent-uri"))
508-
.consumeErrorWith(e -> assertThat(e).isInstanceOf(McpError.class)
509+
.consumeErrorWith(e -> assertThat(e).isInstanceOf(IllegalStateException.class)
509510
.hasMessage("Root with uri 'nonexistent-uri' not found"))
510511
.verify();
511512
});

0 commit comments

Comments
 (0)