From f7c61fafdb61b28d63c2dea6a28b4e3beedaa8e9 Mon Sep 17 00:00:00 2001 From: Pranav Senthilnathan Date: Fri, 24 Jul 2026 16:46:39 -0700 Subject: [PATCH] Extend server/discover probe timeout in in-memory tests to fix flaky Windows Debug CI hang (#1701) (#1702) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Stephen Halter --- tests/ModelContextProtocol.Tests/ClientServerTestBase.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ModelContextProtocol.Tests/ClientServerTestBase.cs b/tests/ModelContextProtocol.Tests/ClientServerTestBase.cs index 564225a..4e500b5 100644 --- a/tests/ModelContextProtocol.Tests/ClientServerTestBase.cs +++ b/tests/ModelContextProtocol.Tests/ClientServerTestBase.cs @@ -86,6 +86,12 @@ public abstract class ClientServerTestBase : LoggedTest, IAsyncDisposable protected async Task CreateMcpClientForServer(McpClientOptions? clientOptions = null) { + clientOptions ??= new McpClientOptions(); + + // Disable the server/discover probe timeout to avoid CI slowness spuriously tripping it (issue #1701). + // Tests that need a specific probe timeout should create their own client instead of using this helper. + clientOptions.DiscoverProbeTimeout = TestConstants.DefaultTimeout; + return await McpClient.CreateAsync( new StreamClientTransport( serverInput: _clientToServerPipe.Writer.AsStream(),