Skip to content

Commit 688a602

Browse files
Copilotstephentoub
andcommitted
Skip flaky test on Mono and revert incorrect fix
Co-authored-by: stephentoub <[email protected]>
1 parent 4b8a947 commit 688a602

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ModelContextProtocol.Core/Client/StdioClientSessionTransport.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ protected override async ValueTask CleanupAsync(Exception? error = null, Cancell
7474
// The process has exited, but we still need to ensure stderr has been flushed.
7575
#if NET
7676
await _process.WaitForExitAsync(cancellationToken).ConfigureAwait(false);
77-
#endif
77+
#else
7878
_process.WaitForExit();
79+
#endif
7980
}
8081
catch { }
8182

tests/ModelContextProtocol.Tests/Transport/StdioClientTransportTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public async Task CreateAsync_ValidProcessInvalidServer_Throws()
2222
await Assert.ThrowsAsync<IOException>(() => McpClient.CreateAsync(transport, loggerFactory: LoggerFactory, cancellationToken: TestContext.Current.CancellationToken));
2323
}
2424

25-
// [Fact(Skip = "Platform not supported by this test.", SkipUnless = nameof(IsStdErrCallbackSupported))]
26-
[Fact]
25+
[Fact(Skip = "Platform not supported by this test.", SkipUnless = nameof(IsStdErrCallbackSupported))]
2726
public async Task CreateAsync_ValidProcessInvalidServer_StdErrCallbackInvoked()
2827
{
2928
string id = Guid.NewGuid().ToString("N");

0 commit comments

Comments
 (0)