JDK HTTP Client Streamable HTTP support by taobaorun · Pull Request #317 · modelcontextprotocol/java-sdk · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ protected void onClose() {
}

protected Duration getRequestTimeout() {
return Duration.ofSeconds(14);
return Duration.ofSeconds(2100);
}

protected Duration getInitializationTimeout() {
return Duration.ofSeconds(2);
return Duration.ofSeconds(2000);
}

McpAsyncClient client(McpClientTransport transport) {
Expand Down Expand Up @@ -129,6 +129,14 @@ <T> void verifyCallSucceedsWithImplicitInitialization(Function<McpAsyncClient, M
});
}

@Test
void testInitialize() {
withClient(createMcpTransport(), mcpAsyncClient -> {
StepVerifier.create(mcpAsyncClient.initialize().then()).verifyComplete();
});

}

@Test
void testConstructorWithInvalidArguments() {
assertThatThrownBy(() -> McpClient.async(null).build()).isInstanceOf(IllegalArgumentException.class)
Expand Down
Loading