From 4d394bee09aad108d5e5609e4b262442e891ede0 Mon Sep 17 00:00:00 2001 From: jitokim Date: Sun, 6 Apr 2025 02:10:43 +0900 Subject: [PATCH] fix typo in WebFluxSseIntegrationTests Signed-off-by: jitokim --- .../WebFluxSseIntegrationTests.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java b/mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java index 2be2f81f..260bedb4 100644 --- a/mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java +++ b/mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java @@ -62,7 +62,7 @@ public class WebFluxSseIntegrationTests { private WebFluxSseServerTransportProvider mcpServerTransportProvider; - ConcurrentHashMap clientBulders = new ConcurrentHashMap<>(); + ConcurrentHashMap clientBuilders = new ConcurrentHashMap<>(); @BeforeEach public void before() { @@ -77,11 +77,11 @@ public void before() { ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler); this.httpServer = HttpServer.create().port(PORT).handle(adapter).bindNow(); - clientBulders.put("httpclient", + clientBuilders.put("httpclient", McpClient.sync(HttpClientSseClientTransport.builder("http://localhost:" + PORT) .sseEndpoint(CUSTOM_SSE_ENDPOINT) .build())); - clientBulders.put("webflux", + clientBuilders.put("webflux", McpClient .sync(WebFluxSseClientTransport.builder(WebClient.builder().baseUrl("http://localhost:" + PORT)) .sseEndpoint(CUSTOM_SSE_ENDPOINT) @@ -103,7 +103,7 @@ public void after() { @ValueSource(strings = { "httpclient", "webflux" }) void testCreateMessageWithoutSamplingCapabilities(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification( new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> { @@ -134,7 +134,7 @@ void testCreateMessageWithoutSamplingCapabilities(String clientType) { void testCreateMessageSuccess(String clientType) throws InterruptedException { // Client - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); Function samplingHandler = request -> { assertThat(request.messages()).hasSize(1); @@ -203,7 +203,7 @@ void testCreateMessageSuccess(String clientType) throws InterruptedException { @ParameterizedTest(name = "{0} : {displayName} ") @ValueSource(strings = { "httpclient", "webflux" }) void testRootsSuccess(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); List roots = List.of(new Root("uri1://", "root1"), new Root("uri2://", "root2")); @@ -250,7 +250,7 @@ void testRootsSuccess(String clientType) { @ValueSource(strings = { "httpclient", "webflux" }) void testRootsWithoutCapability(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); McpServerFeatures.SyncToolSpecification tool = new McpServerFeatures.SyncToolSpecification( new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> { @@ -284,7 +284,7 @@ void testRootsWithoutCapability(String clientType) { @ParameterizedTest(name = "{0} : {displayName} ") @ValueSource(strings = { "httpclient", "webflux" }) void testRootsNotifciationWithEmptyRootsList(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); AtomicReference> rootsRef = new AtomicReference<>(); var mcpServer = McpServer.sync(mcpServerTransportProvider) @@ -311,7 +311,7 @@ void testRootsNotifciationWithEmptyRootsList(String clientType) { @ParameterizedTest(name = "{0} : {displayName} ") @ValueSource(strings = { "httpclient", "webflux" }) void testRootsWithMultipleHandlers(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); List roots = List.of(new Root("uri1://", "root1")); @@ -345,7 +345,7 @@ void testRootsWithMultipleHandlers(String clientType) { @ValueSource(strings = { "httpclient", "webflux" }) void testRootsServerCloseWithActiveSubscription(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); List roots = List.of(new Root("uri1://", "root1")); @@ -390,7 +390,7 @@ void testRootsServerCloseWithActiveSubscription(String clientType) { @ValueSource(strings = { "httpclient", "webflux" }) void testToolCallSuccess(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); var callResponse = new McpSchema.CallToolResult(List.of(new McpSchema.TextContent("CALL RESPONSE")), null); McpServerFeatures.SyncToolSpecification tool1 = new McpServerFeatures.SyncToolSpecification( @@ -430,7 +430,7 @@ void testToolCallSuccess(String clientType) { @ValueSource(strings = { "httpclient", "webflux" }) void testToolListChangeHandlingSuccess(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); var callResponse = new McpSchema.CallToolResult(List.of(new McpSchema.TextContent("CALL RESPONSE")), null); McpServerFeatures.SyncToolSpecification tool1 = new McpServerFeatures.SyncToolSpecification( @@ -500,7 +500,7 @@ void testToolListChangeHandlingSuccess(String clientType) { @ValueSource(strings = { "httpclient", "webflux" }) void testInitialize(String clientType) { - var clientBuilder = clientBulders.get(clientType); + var clientBuilder = this.clientBuilders.get(clientType); var mcpServer = McpServer.sync(mcpServerTransportProvider).build();