File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/test/java/com/github/codeboyzhou/mcp/declarative Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2929import java .util .List ;
3030import java .util .Map ;
3131import java .util .Random ;
32+ import java .util .concurrent .Executors ;
3233import org .junit .jupiter .api .Test ;
3334
3435class McpServersTest {
@@ -52,7 +53,7 @@ void testStartStdioServer_shouldSucceed() {
5253 new StdioClientTransport (serverParameters , McpJsonMapper .getDefault ());
5354
5455 try (McpSyncClient client = McpClient .sync (transport ).requestTimeout (requestTimeout ).build ()) {
55- verify (client );
56+ Executors . newSingleThreadExecutor (). execute (() -> verify (client ) );
5657 }
5758 }
5859
Original file line number Diff line number Diff line change 77public class TestMcpStdioServer {
88
99 public static void main (String [] args ) {
10- McpServerInfo info =
10+ McpServerInfo serverInfo =
1111 McpServerInfo .builder ()
1212 .name ("mcp-server" )
1313 .version ("1.0.0" )
1414 .instructions ("test" )
1515 .requestTimeout (Duration .ofSeconds (60 ))
1616 .build ();
17- McpServers .run (TestMcpStdioServer .class , args ).startStdioServer (info );
17+ McpServers .run (TestMcpStdioServer .class , args ).startStdioServer (serverInfo );
1818 }
1919}
You can’t perform that action at this time.
0 commit comments