Skip to content

Commit cba8523

Browse files
committed
Fix flaky Should_Start_In_Connected_State test
1 parent 1d44cec commit cba8523

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/ModelContextProtocol/Shared/McpJsonRpcEndpoint.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public async ValueTask DisposeAsync()
101101
/// <returns></returns>
102102
public virtual async ValueTask DisposeUnsynchronizedAsync()
103103
{
104-
// Both McpClient and McpServer guard this with a semaphore
105104
_logger.CleaningUpEndpoint(EndpointName);
106105

107106
if (_sessionCts is not null)

tests/ModelContextProtocol.Tests/Transport/StdioServerTransportTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void Constructor_Throws_For_Null_Options()
5858
[Fact]
5959
public async Task Should_Start_In_Connected_State()
6060
{
61-
await using var transport = new StdioServerTransport(_serverOptions.ServerInfo.Name, Stream.Null, Stream.Null, LoggerFactory);
61+
await using var transport = new StdioServerTransport(_serverOptions.ServerInfo.Name, new Pipe().Reader.AsStream(), Stream.Null, LoggerFactory);
6262

6363
Assert.True(transport.IsConnected);
6464
}

0 commit comments

Comments
 (0)