Skip to content

Commit f7c61fa

Browse files
PranavSenthilnathanCopilothalter73
authored
Extend server/discover probe timeout in in-memory tests to fix flaky Windows Debug CI hang (#1701) (#1702)
Co-authored-by: Copilot <[email protected]> Co-authored-by: Stephen Halter <[email protected]>
1 parent ae36026 commit f7c61fa

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎tests/ModelContextProtocol.Tests/ClientServerTestBase.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ public async ValueTask DisposeAsync()
8686

8787
protected async Task<McpClient> CreateMcpClientForServer(McpClientOptions? clientOptions = null)
8888
{
89+
clientOptions ??= new McpClientOptions();
90+
91+
// Disable the server/discover probe timeout to avoid CI slowness spuriously tripping it (issue #1701).
92+
// Tests that need a specific probe timeout should create their own client instead of using this helper.
93+
clientOptions.DiscoverProbeTimeout = TestConstants.DefaultTimeout;
94+
8995
return await McpClient.CreateAsync(
9096
new StreamClientTransport(
9197
serverInput: _clientToServerPipe.Writer.AsStream(),

0 commit comments

Comments
 (0)