From f0cf7bd6eb530f448d3277686faf4ca673bf7c79 Mon Sep 17 00:00:00 2001 From: liammclennan-ro Date: Fri, 27 Nov 2026 15:22:03 +1000 Subject: [PATCH] Fix MCP server race. Assisted-by: claude/fable5-2 --- test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs b/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs index af49598e..124c696a 100644 --- a/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs +++ b/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs @@ -1,6 +1,7 @@ using System.Linq; using System.Text.Json; using System.Text.RegularExpressions; +using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; using ModelContextProtocol.Client; @@ -28,7 +29,14 @@ public async Task ExecuteAsync(SeqConnection connection, ILogger logger, CliComm Arguments = [TestConfiguration.TestedBinary, "mcp", "run", $"--server={connection.Client.ServerUrl}"] }); - await using var client = await McpClient.CreateAsync(transport); + await using var client = await McpClient.CreateAsync( + transport, + new McpClientOptions + { + // The MCP client needs to wait for the MCP server to start, + // which takes ~5s on Github actions. + DiscoverProbeTimeout = Timeout.InfiniteTimeSpan + }); await ExecuteAsync(connection, logger, client); }