File tree Expand file tree Collapse file tree 2 files changed +24
-13
lines changed
mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol Expand file tree Collapse file tree 2 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 44
55package io .modelcontextprotocol ;
66
7+ import java .time .Duration ;
8+
79import org .junit .jupiter .api .AfterEach ;
810import org .junit .jupiter .api .BeforeEach ;
911import org .springframework .http .server .reactive .HttpHandler ;
@@ -39,15 +41,19 @@ class WebFluxSseIntegrationTests extends AbstractMcpClientServerIntegrationTests
3941 @ Override
4042 protected void prepareClients (int port , String mcpEndpoint ) {
4143
42- clientBuilders .put ("httpclient" ,
43- McpClient .sync (HttpClientSseClientTransport .builder ("http://localhost:" + PORT )
44- .sseEndpoint (CUSTOM_SSE_ENDPOINT )
45- .build ()));
44+ clientBuilders
45+ .put ("httpclient" ,
46+ McpClient .sync (HttpClientSseClientTransport .builder ("http://localhost:" + PORT )
47+ .sseEndpoint (CUSTOM_SSE_ENDPOINT )
48+ .build ()).requestTimeout (Duration .ofHours (10 )));
49+
4650 clientBuilders .put ("webflux" ,
4751 McpClient
4852 .sync (WebFluxSseClientTransport .builder (WebClient .builder ().baseUrl ("http://localhost:" + PORT ))
4953 .sseEndpoint (CUSTOM_SSE_ENDPOINT )
50- .build ()));
54+ .build ())
55+ .requestTimeout (Duration .ofHours (10 )));
56+
5157 }
5258
5359 @ Override
Original file line number Diff line number Diff line change 44
55package io .modelcontextprotocol ;
66
7+ import java .time .Duration ;
8+
79import org .junit .jupiter .api .AfterEach ;
810import org .junit .jupiter .api .BeforeEach ;
911import org .springframework .http .server .reactive .HttpHandler ;
@@ -37,15 +39,18 @@ class WebFluxStreamableIntegrationTests extends AbstractMcpClientServerIntegrati
3739 @ Override
3840 protected void prepareClients (int port , String mcpEndpoint ) {
3941
40- clientBuilders .put ("httpclient" ,
41- McpClient .sync (HttpClientStreamableHttpTransport .builder ("http://localhost:" + PORT )
42- .endpoint (CUSTOM_MESSAGE_ENDPOINT )
43- .build ()));
42+ clientBuilders
43+ .put ("httpclient" ,
44+ McpClient .sync (HttpClientStreamableHttpTransport .builder ("http://localhost:" + PORT )
45+ .endpoint (CUSTOM_MESSAGE_ENDPOINT )
46+ .build ()).requestTimeout (Duration .ofHours (10 )));
4447 clientBuilders .put ("webflux" ,
45- McpClient .sync (WebClientStreamableHttpTransport
46- .builder (WebClient .builder ().baseUrl ("http://localhost:" + PORT ))
47- .endpoint (CUSTOM_MESSAGE_ENDPOINT )
48- .build ()));
48+ McpClient
49+ .sync (WebClientStreamableHttpTransport
50+ .builder (WebClient .builder ().baseUrl ("http://localhost:" + PORT ))
51+ .endpoint (CUSTOM_MESSAGE_ENDPOINT )
52+ .build ())
53+ .requestTimeout (Duration .ofHours (10 )));
4954 }
5055
5156 @ Override
You can’t perform that action at this time.
0 commit comments