Fix process crash when testing Stderr (#1449)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
70442e9351
commit
2e7209c35a
1 changed files with 254 additions and 148 deletions
|
|
@ -181,9 +181,10 @@ public class McpServerOptionsSetupTests
|
|||
};
|
||||
})
|
||||
.WithResources<SimpleResourceType>()
|
||||
.WithStdioServerTransport();
|
||||
.WithStreamServerTransport(Stream.Null, Stream.Null);
|
||||
|
||||
var options = services.BuildServiceProvider().GetRequiredService<IOptions<McpServerOptions>>().Value;
|
||||
await using var sp = services.BuildServiceProvider();
|
||||
var options = sp.GetRequiredService<IOptions<McpServerOptions>>().Value;
|
||||
|
||||
// The options should preserve the user's manually set capabilities
|
||||
Assert.NotNull(options.Capabilities?.Resources);
|
||||
|
|
|
|||
Loading…
Reference in a new issue