Skip to content

Commit 734153a

Browse files
jitokimtzolov
authored andcommitted
fix typo in WebFluxSseIntegrationTests
Signed-off-by: jitokim <[email protected]>
1 parent cd624a7 commit 734153a

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java

+13-15
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ public class WebFluxSseIntegrationTests {
5252

5353
private static final int PORT = 8182;
5454

55-
// private static final String MESSAGE_ENDPOINT = "/mcp/message";
56-
5755
private static final String CUSTOM_SSE_ENDPOINT = "/somePath/sse";
5856

5957
private static final String CUSTOM_MESSAGE_ENDPOINT = "/otherPath/mcp/message";
@@ -62,7 +60,7 @@ public class WebFluxSseIntegrationTests {
6260

6361
private WebFluxSseServerTransportProvider mcpServerTransportProvider;
6462

65-
ConcurrentHashMap<String, McpClient.SyncSpec> clientBulders = new ConcurrentHashMap<>();
63+
ConcurrentHashMap<String, McpClient.SyncSpec> clientBuilders = new ConcurrentHashMap<>();
6664

6765
@BeforeEach
6866
public void before() {
@@ -77,11 +75,11 @@ public void before() {
7775
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler);
7876
this.httpServer = HttpServer.create().port(PORT).handle(adapter).bindNow();
7977

80-
clientBulders.put("httpclient",
78+
clientBuilders.put("httpclient",
8179
McpClient.sync(HttpClientSseClientTransport.builder("http://localhost:" + PORT)
8280
.sseEndpoint(CUSTOM_SSE_ENDPOINT)
8381
.build()));
84-
clientBulders.put("webflux",
82+
clientBuilders.put("webflux",
8583
McpClient
8684
.sync(WebFluxSseClientTransport.builder(WebClient.builder().baseUrl("http://localhost:" + PORT))
8785
.sseEndpoint(CUSTOM_SSE_ENDPOINT)
@@ -103,7 +101,7 @@ public void after() {
103101
@ValueSource(strings = { "httpclient", "webflux" })
104102
void testCreateMessageWithoutSamplingCapabilities(String clientType) {
105103

106-
var clientBuilder = clientBulders.get(clientType);
104+
var clientBuilder = clientBuilders.get(clientType);
107105

108106
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
109107
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
@@ -134,7 +132,7 @@ void testCreateMessageWithoutSamplingCapabilities(String clientType) {
134132
void testCreateMessageSuccess(String clientType) throws InterruptedException {
135133

136134
// Client
137-
var clientBuilder = clientBulders.get(clientType);
135+
var clientBuilder = clientBuilders.get(clientType);
138136

139137
Function<CreateMessageRequest, CreateMessageResult> samplingHandler = request -> {
140138
assertThat(request.messages()).hasSize(1);
@@ -203,7 +201,7 @@ void testCreateMessageSuccess(String clientType) throws InterruptedException {
203201
@ParameterizedTest(name = "{0} : {displayName} ")
204202
@ValueSource(strings = { "httpclient", "webflux" })
205203
void testRootsSuccess(String clientType) {
206-
var clientBuilder = clientBulders.get(clientType);
204+
var clientBuilder = clientBuilders.get(clientType);
207205

208206
List<Root> roots = List.of(new Root("uri1://", "root1"), new Root("uri2://", "root2"));
209207

@@ -250,7 +248,7 @@ void testRootsSuccess(String clientType) {
250248
@ValueSource(strings = { "httpclient", "webflux" })
251249
void testRootsWithoutCapability(String clientType) {
252250

253-
var clientBuilder = clientBulders.get(clientType);
251+
var clientBuilder = clientBuilders.get(clientType);
254252

255253
McpServerFeatures.SyncToolSpecification tool = new McpServerFeatures.SyncToolSpecification(
256254
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
@@ -284,7 +282,7 @@ void testRootsWithoutCapability(String clientType) {
284282
@ParameterizedTest(name = "{0} : {displayName} ")
285283
@ValueSource(strings = { "httpclient", "webflux" })
286284
void testRootsNotifciationWithEmptyRootsList(String clientType) {
287-
var clientBuilder = clientBulders.get(clientType);
285+
var clientBuilder = clientBuilders.get(clientType);
288286

289287
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
290288
var mcpServer = McpServer.sync(mcpServerTransportProvider)
@@ -311,7 +309,7 @@ void testRootsNotifciationWithEmptyRootsList(String clientType) {
311309
@ParameterizedTest(name = "{0} : {displayName} ")
312310
@ValueSource(strings = { "httpclient", "webflux" })
313311
void testRootsWithMultipleHandlers(String clientType) {
314-
var clientBuilder = clientBulders.get(clientType);
312+
var clientBuilder = clientBuilders.get(clientType);
315313

316314
List<Root> roots = List.of(new Root("uri1://", "root1"));
317315

@@ -345,7 +343,7 @@ void testRootsWithMultipleHandlers(String clientType) {
345343
@ValueSource(strings = { "httpclient", "webflux" })
346344
void testRootsServerCloseWithActiveSubscription(String clientType) {
347345

348-
var clientBuilder = clientBulders.get(clientType);
346+
var clientBuilder = clientBuilders.get(clientType);
349347

350348
List<Root> roots = List.of(new Root("uri1://", "root1"));
351349

@@ -390,7 +388,7 @@ void testRootsServerCloseWithActiveSubscription(String clientType) {
390388
@ValueSource(strings = { "httpclient", "webflux" })
391389
void testToolCallSuccess(String clientType) {
392390

393-
var clientBuilder = clientBulders.get(clientType);
391+
var clientBuilder = clientBuilders.get(clientType);
394392

395393
var callResponse = new McpSchema.CallToolResult(List.of(new McpSchema.TextContent("CALL RESPONSE")), null);
396394
McpServerFeatures.SyncToolSpecification tool1 = new McpServerFeatures.SyncToolSpecification(
@@ -430,7 +428,7 @@ void testToolCallSuccess(String clientType) {
430428
@ValueSource(strings = { "httpclient", "webflux" })
431429
void testToolListChangeHandlingSuccess(String clientType) {
432430

433-
var clientBuilder = clientBulders.get(clientType);
431+
var clientBuilder = clientBuilders.get(clientType);
434432

435433
var callResponse = new McpSchema.CallToolResult(List.of(new McpSchema.TextContent("CALL RESPONSE")), null);
436434
McpServerFeatures.SyncToolSpecification tool1 = new McpServerFeatures.SyncToolSpecification(
@@ -500,7 +498,7 @@ void testToolListChangeHandlingSuccess(String clientType) {
500498
@ValueSource(strings = { "httpclient", "webflux" })
501499
void testInitialize(String clientType) {
502500

503-
var clientBuilder = clientBulders.get(clientType);
501+
var clientBuilder = clientBuilders.get(clientType);
504502

505503
var mcpServer = McpServer.sync(mcpServerTransportProvider).build();
506504

0 commit comments

Comments
 (0)