File tree Expand file tree Collapse file tree
mcp-core/src/main/java/io/modelcontextprotocol/server
mcp-test/src/main/java/io/modelcontextprotocol Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ public McpSchema.Implementation getServerInfo() {
5050
5151 /**
5252 * Gracefully closes the server, allowing any in-progress operations to complete.
53- * @return A Mono that completes when the server has been closed
53+ *
5454 */
55- public Mono < Void > closeGracefully () {
56- return this .asyncServer .closeGracefully ();
55+ public void closeGracefully () {
56+ this .asyncServer .closeGracefully (). block ();
5757 }
5858
5959 /**
Original file line number Diff line number Diff line change 44
55package io .modelcontextprotocol ;
66
7- import static io .modelcontextprotocol .util .ToolsUtils .EMPTY_JSON_SCHEMA ;
8-
97import java .net .URI ;
108import java .net .http .HttpClient ;
119import java .net .http .HttpRequest ;
3129import net .javacrumbs .jsonunit .core .Option ;
3230import org .junit .jupiter .params .ParameterizedTest ;
3331import org .junit .jupiter .params .provider .MethodSource ;
34- import org .junit .jupiter .params .provider .ValueSource ;
3532import reactor .core .publisher .Mono ;
3633
34+ import static io .modelcontextprotocol .util .ToolsUtils .EMPTY_JSON_SCHEMA ;
3735import static net .javacrumbs .jsonunit .assertj .JsonAssertions .assertThatJson ;
3836import static net .javacrumbs .jsonunit .assertj .JsonAssertions .json ;
3937import static org .assertj .core .api .Assertions .assertThat ;
@@ -128,7 +126,7 @@ void testToolCallSuccess(String clientType) {
128126 assertThat (response ).isNotNull ().isEqualTo (callResponse );
129127 }
130128 finally {
131- mcpServer .closeGracefully (). block () ;
129+ mcpServer .closeGracefully ();
132130 }
133131 }
134132
You can’t perform that action at this time.
0 commit comments