avichaym commented on code in PR #539:
URL: https://github.com/apache/flink-agents/pull/539#discussion_r2872490102
##########
integrations/mcp/src/test/java/org/apache/flink/agents/integrations/mcp/MCPServerTest.java:
##########
@@ -243,4 +243,16 @@ void testClose() {
server.close();
server.close(); // Calling twice should be safe
}
+
+ @Test
+ @DisabledOnJre(JRE.JAVA_11)
+ @DisplayName("supportsPrompts method exists and is callable via
reflection")
+ void testSupportsPromptsMethodExists() throws Exception {
+ MCPServer server = new MCPServer(DEFAULT_ENDPOINT);
+
+ // Verify the method exists (AgentPlan calls it via reflection)
+ java.lang.reflect.Method method =
server.getClass().getMethod("supportsPrompts");
+ assertThat(method).isNotNull();
+ assertThat(method.getReturnType()).isEqualTo(boolean.class);
+ }
Review Comment:
Replaced with testListPromptsReturnsEmptyWhenNotSupported — calls
listPrompts() on a server without prompt support and verifies it returns an
empty list without throwing. Tests the actual behavior
rather than checking a method exists via reflection.
--
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]