Skip to content

Commit deb8bd8

Browse files
committed
Bring back blocking op offloading to sync tests
1 parent ea0dfd4 commit deb8bd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mcp/src/test/java/io/modelcontextprotocol/client/AbstractMcpSyncClientTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ <T> void verifyNotificationSucceedsWithImplicitInitialization(Consumer<McpSyncCl
122122

123123
<T> void verifyCallSucceedsWithImplicitInitialization(Function<McpSyncClient, T> blockingOperation, String action) {
124124
withClient(createMcpTransport(), mcpSyncClient -> {
125-
StepVerifier.create(Mono.fromSupplier(() -> blockingOperation.apply(mcpSyncClient)))
126-
.expectNextCount(1)
127-
.verifyComplete();
125+
StepVerifier.create(Mono.fromSupplier(() -> blockingOperation.apply(mcpSyncClient))
126+
// Offload the blocking call to the real scheduler
127+
.subscribeOn(Schedulers.boundedElastic())).expectNextCount(1).verifyComplete();
128128
});
129129
}
130130

0 commit comments

Comments
 (0)