fix: correct typos in variable names, method names, and commentsj (#159)
This commit is contained in:
parent
f7f8ccd0ac
commit
84adde16a5
11 changed files with 32 additions and 32 deletions
|
|
@ -141,7 +141,7 @@ public class WebFluxSseServerTransportProvider implements McpServerTransportProv
|
||||||
* Constructs a new WebFlux SSE server transport provider instance.
|
* Constructs a new WebFlux SSE server transport provider instance.
|
||||||
* @param objectMapper The ObjectMapper to use for JSON serialization/deserialization
|
* @param objectMapper The ObjectMapper to use for JSON serialization/deserialization
|
||||||
* of MCP messages. Must not be null.
|
* of MCP messages. Must not be null.
|
||||||
* @param baseUrl webflux messag base path
|
* @param baseUrl webflux message base path
|
||||||
* @param messageEndpoint The endpoint URI where clients should send their JSON-RPC
|
* @param messageEndpoint The endpoint URI where clients should send their JSON-RPC
|
||||||
* messages. This endpoint will be communicated to clients during SSE connection
|
* messages. This endpoint will be communicated to clients during SSE connection
|
||||||
* setup. Must not be null.
|
* setup. Must not be null.
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ class WebFluxSseIntegrationTests {
|
||||||
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
|
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
|
||||||
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
|
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
|
||||||
|
|
||||||
var craeteMessageRequest = McpSchema.CreateMessageRequest.builder()
|
var createMessageRequest = McpSchema.CreateMessageRequest.builder()
|
||||||
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
|
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
|
||||||
new McpSchema.TextContent("Test message"))))
|
new McpSchema.TextContent("Test message"))))
|
||||||
.modelPreferences(ModelPreferences.builder()
|
.modelPreferences(ModelPreferences.builder()
|
||||||
|
|
@ -163,7 +163,7 @@ class WebFluxSseIntegrationTests {
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return exchange.createMessage(craeteMessageRequest)
|
return exchange.createMessage(createMessageRequest)
|
||||||
.doOnNext(samplingResult::set)
|
.doOnNext(samplingResult::set)
|
||||||
.thenReturn(callResponse);
|
.thenReturn(callResponse);
|
||||||
});
|
});
|
||||||
|
|
@ -421,7 +421,7 @@ class WebFluxSseIntegrationTests {
|
||||||
|
|
||||||
@ParameterizedTest(name = "{0} : {displayName} ")
|
@ParameterizedTest(name = "{0} : {displayName} ")
|
||||||
@ValueSource(strings = { "httpclient", "webflux" })
|
@ValueSource(strings = { "httpclient", "webflux" })
|
||||||
void testRootsNotifciationWithEmptyRootsList(String clientType) {
|
void testRootsNotificationWithEmptyRootsList(String clientType) {
|
||||||
var clientBuilder = clientBuilders.get(clientType);
|
var clientBuilder = clientBuilders.get(clientType);
|
||||||
|
|
||||||
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
|
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ class WebMvcSseIntegrationTests {
|
||||||
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
|
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
|
||||||
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
|
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
|
||||||
|
|
||||||
var craeteMessageRequest = McpSchema.CreateMessageRequest.builder()
|
var createMessageRequest = McpSchema.CreateMessageRequest.builder()
|
||||||
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
|
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
|
||||||
new McpSchema.TextContent("Test message"))))
|
new McpSchema.TextContent("Test message"))))
|
||||||
.modelPreferences(ModelPreferences.builder()
|
.modelPreferences(ModelPreferences.builder()
|
||||||
|
|
@ -180,7 +180,7 @@ class WebMvcSseIntegrationTests {
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
StepVerifier.create(exchange.createMessage(craeteMessageRequest)).consumeNextWith(result -> {
|
StepVerifier.create(exchange.createMessage(createMessageRequest)).consumeNextWith(result -> {
|
||||||
assertThat(result).isNotNull();
|
assertThat(result).isNotNull();
|
||||||
assertThat(result.role()).isEqualTo(Role.USER);
|
assertThat(result.role()).isEqualTo(Role.USER);
|
||||||
assertThat(result.content()).isInstanceOf(McpSchema.TextContent.class);
|
assertThat(result.content()).isInstanceOf(McpSchema.TextContent.class);
|
||||||
|
|
@ -438,7 +438,7 @@ class WebMvcSseIntegrationTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testRootsNotifciationWithEmptyRootsList() {
|
void testRootsNotificationWithEmptyRootsList() {
|
||||||
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
|
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
|
||||||
|
|
||||||
var mcpServer = McpServer.sync(mcpServerTransportProvider)
|
var mcpServer = McpServer.sync(mcpServerTransportProvider)
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ public abstract class AbstractMcpAsyncServerTests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
StepVerifier.create(mcpAsyncServer.addTool(new McpServerFeatures.AsyncToolSpecification(newTool,
|
StepVerifier.create(mcpAsyncServer.addTool(new McpServerFeatures.AsyncToolSpecification(newTool,
|
||||||
(excnage, args) -> Mono.just(new CallToolResult(List.of(), false)))))
|
(exchange, args) -> Mono.just(new CallToolResult(List.of(), false)))))
|
||||||
.verifyComplete();
|
.verifyComplete();
|
||||||
|
|
||||||
assertThatCode(() -> mcpAsyncServer.closeGracefully().block(Duration.ofSeconds(10))).doesNotThrowAnyException();
|
assertThatCode(() -> mcpAsyncServer.closeGracefully().block(Duration.ofSeconds(10))).doesNotThrowAnyException();
|
||||||
|
|
|
||||||
|
|
@ -200,16 +200,16 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
|
|
||||||
Resource resource = new Resource(TEST_RESOURCE_URI, "Test Resource", "text/plain", "Test resource description",
|
Resource resource = new Resource(TEST_RESOURCE_URI, "Test Resource", "text/plain", "Test resource description",
|
||||||
null);
|
null);
|
||||||
McpServerFeatures.SyncResourceSpecification specificaiton = new McpServerFeatures.SyncResourceSpecification(
|
McpServerFeatures.SyncResourceSpecification specification = new McpServerFeatures.SyncResourceSpecification(
|
||||||
resource, (exchange, req) -> new ReadResourceResult(List.of()));
|
resource, (exchange, req) -> new ReadResourceResult(List.of()));
|
||||||
|
|
||||||
assertThatCode(() -> mcpSyncServer.addResource(specificaiton)).doesNotThrowAnyException();
|
assertThatCode(() -> mcpSyncServer.addResource(specification)).doesNotThrowAnyException();
|
||||||
|
|
||||||
assertThatCode(() -> mcpSyncServer.closeGracefully()).doesNotThrowAnyException();
|
assertThatCode(() -> mcpSyncServer.closeGracefully()).doesNotThrowAnyException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testAddResourceWithNullSpecifiation() {
|
void testAddResourceWithNullSpecification() {
|
||||||
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
||||||
.serverInfo("test-server", "1.0.0")
|
.serverInfo("test-server", "1.0.0")
|
||||||
.capabilities(ServerCapabilities.builder().resources(true, false).build())
|
.capabilities(ServerCapabilities.builder().resources(true, false).build())
|
||||||
|
|
@ -279,11 +279,11 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
||||||
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
|
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
|
||||||
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
||||||
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
||||||
|
|
||||||
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specificaiton)).isInstanceOf(McpError.class)
|
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specification)).isInstanceOf(McpError.class)
|
||||||
.hasMessage("Server must be configured with prompt capabilities");
|
.hasMessage("Server must be configured with prompt capabilities");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -300,14 +300,14 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
@Test
|
@Test
|
||||||
void testRemovePrompt() {
|
void testRemovePrompt() {
|
||||||
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
||||||
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
|
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
|
||||||
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
||||||
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
||||||
|
|
||||||
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
||||||
.serverInfo("test-server", "1.0.0")
|
.serverInfo("test-server", "1.0.0")
|
||||||
.capabilities(ServerCapabilities.builder().prompts(true).build())
|
.capabilities(ServerCapabilities.builder().prompts(true).build())
|
||||||
.prompts(specificaiton)
|
.prompts(specification)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
assertThatCode(() -> mcpSyncServer.removePrompt(TEST_PROMPT_NAME)).doesNotThrowAnyException();
|
assertThatCode(() -> mcpSyncServer.removePrompt(TEST_PROMPT_NAME)).doesNotThrowAnyException();
|
||||||
|
|
@ -340,7 +340,7 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
|
|
||||||
var singleConsumerServer = McpServer.sync(createMcpTransportProvider())
|
var singleConsumerServer = McpServer.sync(createMcpTransportProvider())
|
||||||
.serverInfo("test-server", "1.0.0")
|
.serverInfo("test-server", "1.0.0")
|
||||||
.rootsChangeHandlers(List.of((exchage, roots) -> {
|
.rootsChangeHandlers(List.of((exchange, roots) -> {
|
||||||
consumerCalled[0] = true;
|
consumerCalled[0] = true;
|
||||||
if (!roots.isEmpty()) {
|
if (!roots.isEmpty()) {
|
||||||
rootsReceived[0] = roots.get(0);
|
rootsReceived[0] = roots.get(0);
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ public interface McpClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param initializationTimeout The duration to wait for the initializaiton
|
* @param initializationTimeout The duration to wait for the initialization
|
||||||
* lifecycle step to complete.
|
* lifecycle step to complete.
|
||||||
* @return This builder instance for method chaining
|
* @return This builder instance for method chaining
|
||||||
* @throws IllegalArgumentException if initializationTimeout is null
|
* @throws IllegalArgumentException if initializationTimeout is null
|
||||||
|
|
@ -435,7 +435,7 @@ public interface McpClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param initializationTimeout The duration to wait for the initializaiton
|
* @param initializationTimeout The duration to wait for the initialization
|
||||||
* lifecycle step to complete.
|
* lifecycle step to complete.
|
||||||
* @return This builder instance for method chaining
|
* @return This builder instance for method chaining
|
||||||
* @throws IllegalArgumentException if initializationTimeout is null
|
* @throws IllegalArgumentException if initializationTimeout is null
|
||||||
|
|
|
||||||
|
|
@ -359,7 +359,7 @@ public class McpAsyncServer {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"Client requested unsupported protocol version: {}, so the server will sugggest the {} version instead",
|
"Client requested unsupported protocol version: {}, so the server will suggest the {} version instead",
|
||||||
initializeRequest.protocolVersion(), serverProtocolVersion);
|
initializeRequest.protocolVersion(), serverProtocolVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1103,7 +1103,7 @@ public final class McpSchema {
|
||||||
* setting minimum log levels, with servers sending notifications containing severity
|
* setting minimum log levels, with servers sending notifications containing severity
|
||||||
* levels, optional logger names, and arbitrary JSON-serializable data.
|
* levels, optional logger names, and arbitrary JSON-serializable data.
|
||||||
*
|
*
|
||||||
* @param level The severity levels. The mimimum log level is set by the client.
|
* @param level The severity levels. The minimum log level is set by the client.
|
||||||
* @param logger The logger that generated the message.
|
* @param logger The logger that generated the message.
|
||||||
* @param data JSON-serializable logging data.
|
* @param data JSON-serializable logging data.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public abstract class AbstractMcpAsyncServerTests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
StepVerifier.create(mcpAsyncServer.addTool(new McpServerFeatures.AsyncToolSpecification(newTool,
|
StepVerifier.create(mcpAsyncServer.addTool(new McpServerFeatures.AsyncToolSpecification(newTool,
|
||||||
(excnage, args) -> Mono.just(new CallToolResult(List.of(), false)))))
|
(exchange, args) -> Mono.just(new CallToolResult(List.of(), false)))))
|
||||||
.verifyComplete();
|
.verifyComplete();
|
||||||
|
|
||||||
assertThatCode(() -> mcpAsyncServer.closeGracefully().block(Duration.ofSeconds(10))).doesNotThrowAnyException();
|
assertThatCode(() -> mcpAsyncServer.closeGracefully().block(Duration.ofSeconds(10))).doesNotThrowAnyException();
|
||||||
|
|
|
||||||
|
|
@ -199,16 +199,16 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
|
|
||||||
Resource resource = new Resource(TEST_RESOURCE_URI, "Test Resource", "text/plain", "Test resource description",
|
Resource resource = new Resource(TEST_RESOURCE_URI, "Test Resource", "text/plain", "Test resource description",
|
||||||
null);
|
null);
|
||||||
McpServerFeatures.SyncResourceSpecification specificaiton = new McpServerFeatures.SyncResourceSpecification(
|
McpServerFeatures.SyncResourceSpecification specification = new McpServerFeatures.SyncResourceSpecification(
|
||||||
resource, (exchange, req) -> new ReadResourceResult(List.of()));
|
resource, (exchange, req) -> new ReadResourceResult(List.of()));
|
||||||
|
|
||||||
assertThatCode(() -> mcpSyncServer.addResource(specificaiton)).doesNotThrowAnyException();
|
assertThatCode(() -> mcpSyncServer.addResource(specification)).doesNotThrowAnyException();
|
||||||
|
|
||||||
assertThatCode(() -> mcpSyncServer.closeGracefully()).doesNotThrowAnyException();
|
assertThatCode(() -> mcpSyncServer.closeGracefully()).doesNotThrowAnyException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testAddResourceWithNullSpecifiation() {
|
void testAddResourceWithNullSpecification() {
|
||||||
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
||||||
.serverInfo("test-server", "1.0.0")
|
.serverInfo("test-server", "1.0.0")
|
||||||
.capabilities(ServerCapabilities.builder().resources(true, false).build())
|
.capabilities(ServerCapabilities.builder().resources(true, false).build())
|
||||||
|
|
@ -278,11 +278,11 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
||||||
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
|
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
|
||||||
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
||||||
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
||||||
|
|
||||||
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specificaiton)).isInstanceOf(McpError.class)
|
assertThatThrownBy(() -> serverWithoutPrompts.addPrompt(specification)).isInstanceOf(McpError.class)
|
||||||
.hasMessage("Server must be configured with prompt capabilities");
|
.hasMessage("Server must be configured with prompt capabilities");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -299,14 +299,14 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
@Test
|
@Test
|
||||||
void testRemovePrompt() {
|
void testRemovePrompt() {
|
||||||
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
Prompt prompt = new Prompt(TEST_PROMPT_NAME, "Test Prompt", List.of());
|
||||||
McpServerFeatures.SyncPromptSpecification specificaiton = new McpServerFeatures.SyncPromptSpecification(prompt,
|
McpServerFeatures.SyncPromptSpecification specification = new McpServerFeatures.SyncPromptSpecification(prompt,
|
||||||
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
(exchange, req) -> new GetPromptResult("Test prompt description", List
|
||||||
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
.of(new PromptMessage(McpSchema.Role.ASSISTANT, new McpSchema.TextContent("Test content")))));
|
||||||
|
|
||||||
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
var mcpSyncServer = McpServer.sync(createMcpTransportProvider())
|
||||||
.serverInfo("test-server", "1.0.0")
|
.serverInfo("test-server", "1.0.0")
|
||||||
.capabilities(ServerCapabilities.builder().prompts(true).build())
|
.capabilities(ServerCapabilities.builder().prompts(true).build())
|
||||||
.prompts(specificaiton)
|
.prompts(specification)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
assertThatCode(() -> mcpSyncServer.removePrompt(TEST_PROMPT_NAME)).doesNotThrowAnyException();
|
assertThatCode(() -> mcpSyncServer.removePrompt(TEST_PROMPT_NAME)).doesNotThrowAnyException();
|
||||||
|
|
@ -339,7 +339,7 @@ public abstract class AbstractMcpSyncServerTests {
|
||||||
|
|
||||||
var singleConsumerServer = McpServer.sync(createMcpTransportProvider())
|
var singleConsumerServer = McpServer.sync(createMcpTransportProvider())
|
||||||
.serverInfo("test-server", "1.0.0")
|
.serverInfo("test-server", "1.0.0")
|
||||||
.rootsChangeHandlers(List.of((exchage, roots) -> {
|
.rootsChangeHandlers(List.of((exchange, roots) -> {
|
||||||
consumerCalled[0] = true;
|
consumerCalled[0] = true;
|
||||||
if (!roots.isEmpty()) {
|
if (!roots.isEmpty()) {
|
||||||
rootsReceived[0] = roots.get(0);
|
rootsReceived[0] = roots.get(0);
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ class HttpServletSseServerTransportProviderIntegrationTests {
|
||||||
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
|
McpServerFeatures.AsyncToolSpecification tool = new McpServerFeatures.AsyncToolSpecification(
|
||||||
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
|
new McpSchema.Tool("tool1", "tool1 description", emptyJsonSchema), (exchange, request) -> {
|
||||||
|
|
||||||
var craeteMessageRequest = McpSchema.CreateMessageRequest.builder()
|
var createMessageRequest = McpSchema.CreateMessageRequest.builder()
|
||||||
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
|
.messages(List.of(new McpSchema.SamplingMessage(McpSchema.Role.USER,
|
||||||
new McpSchema.TextContent("Test message"))))
|
new McpSchema.TextContent("Test message"))))
|
||||||
.modelPreferences(ModelPreferences.builder()
|
.modelPreferences(ModelPreferences.builder()
|
||||||
|
|
@ -163,7 +163,7 @@ class HttpServletSseServerTransportProviderIntegrationTests {
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
StepVerifier.create(exchange.createMessage(craeteMessageRequest)).consumeNextWith(result -> {
|
StepVerifier.create(exchange.createMessage(createMessageRequest)).consumeNextWith(result -> {
|
||||||
assertThat(result).isNotNull();
|
assertThat(result).isNotNull();
|
||||||
assertThat(result.role()).isEqualTo(Role.USER);
|
assertThat(result.role()).isEqualTo(Role.USER);
|
||||||
assertThat(result.content()).isInstanceOf(McpSchema.TextContent.class);
|
assertThat(result.content()).isInstanceOf(McpSchema.TextContent.class);
|
||||||
|
|
@ -417,7 +417,7 @@ class HttpServletSseServerTransportProviderIntegrationTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testRootsNotifciationWithEmptyRootsList() {
|
void testRootsNotificationWithEmptyRootsList() {
|
||||||
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
|
AtomicReference<List<Root>> rootsRef = new AtomicReference<>();
|
||||||
|
|
||||||
var mcpServer = McpServer.sync(mcpServerTransportProvider)
|
var mcpServer = McpServer.sync(mcpServerTransportProvider)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue