ramu11 commented on code in PR #29454:
URL: https://github.com/apache/camel/pull/29454#discussion_r4514903821
##########
components/camel-ai/camel-mcp-server/src/test/java/org/apache/camel/component/mcp/server/stdio/StdioMcpServerEngineTest.java:
##########
@@ -80,6 +86,28 @@ void toolAddedBeforeStartIsQueuedWithoutNpe() {
assertThatCode(() ->
engine.toolRemoved("queued_tool")).doesNotThrowAnyException();
}
+ @Test
+ void promptAddedBeforeStartIsFlushedWhenServerStarts() throws Exception {
+ StdioMcpServerEngine engine = new StdioMcpServerEngine();
+ engine.initialize(new
org.apache.camel.component.mcp.server.McpServerInfo(
+ "test", "1.0", "/mcp", 0, 0, null, null, null, null, null));
+ engine.setTransportStreams(new ByteArrayInputStream(new byte[0]), new
ByteArrayOutputStream());
+ engine.promptAdded(samplePrompt("queued_prompt", "Queued before
start"));
+
+ assertThatCode(engine::start).doesNotThrowAnyException();
Review Comment:
addressed
##########
components/camel-ai/camel-mcp-server/src/test/java/org/apache/camel/component/mcp/server/stdio/StdioMcpServerEngineTest.java:
##########
@@ -80,6 +86,28 @@ void toolAddedBeforeStartIsQueuedWithoutNpe() {
assertThatCode(() ->
engine.toolRemoved("queued_tool")).doesNotThrowAnyException();
}
+ @Test
+ void promptAddedBeforeStartIsFlushedWhenServerStarts() throws Exception {
+ StdioMcpServerEngine engine = new StdioMcpServerEngine();
+ engine.initialize(new
org.apache.camel.component.mcp.server.McpServerInfo(
Review Comment:
addressed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]