Skip flaky test on Mono where stderr callbacks are unsupported (#980)

* Initial plan

* Fix race condition in StdioClientSessionTransport stderr handling

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Simplify WaitForExit logic as suggested in code review

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Skip flaky test on Mono and revert incorrect fix

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
Copilot 2025-11-19 22:34:06 -05:00 • committed by GitHub
commit 3f39ba7936
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,8 +22,7 @@ public class StdioClientTransportTests(ITestOutputHelper testOutputHelper) : Log
await Assert.ThrowsAsync<IOException>(() => McpClient.CreateAsync(transport, loggerFactory: LoggerFactory, cancellationToken: TestContext.Current.CancellationToken));
}
// [Fact(Skip = "Platform not supported by this test.", SkipUnless = nameof(IsStdErrCallbackSupported))]
[Fact]
[Fact(Skip = "Platform not supported by this test.", SkipUnless = nameof(IsStdErrCallbackSupported))]
public async Task CreateAsync_ValidProcessInvalidServer_StdErrCallbackInvoked()
{
string id = Guid.NewGuid().ToString("N");