Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/ModelContextProtocol.Tests/ClientServerTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public async ValueTask DisposeAsync()

protected async Task<McpClient> 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 = Timeout.InfiniteTimeSpan;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the 60 second TestConstant.DefaultTimeout timeout be better?

Suggested change
clientOptions.DiscoverProbeTimeout = Timeout.InfiniteTimeSpan;
clientOptions.DiscoverProbeTimeout = TestConstant.DefaultTimeout;


return await McpClient.CreateAsync(
new StreamClientTransport(
serverInput: _clientToServerPipe.Writer.AsStream(),
Expand Down