Move options validation to constructor (#826)
This works around the breaking change to BackgroundService in https://github.com/dotnet/runtime/pull/116283 which launches ExecuteAsync using Task.Run.
This commit is contained in:
parent
7628b3064f
commit
740a7d0346
1 changed files with 22 additions and 20 deletions
|
|
@ -57,11 +57,7 @@ public class StreamableHttpServerConformanceTests(ITestOutputHelper outputHelper
|
|||
base.Dispose();
|
||||
}
|
||||
|
||||
#if !NET10_0
|
||||
[Fact]
|
||||
#else
|
||||
[Fact(Skip = "https://github.com/modelcontextprotocol/csharp-sdk/issues/823")]
|
||||
#endif
|
||||
public async Task NegativeNonInfiniteIdleTimeout_Throws_ArgumentOutOfRangeException()
|
||||
{
|
||||
Builder.Services.AddMcpServer().WithHttpTransport(options =>
|
||||
|
|
@ -73,11 +69,7 @@ public class StreamableHttpServerConformanceTests(ITestOutputHelper outputHelper
|
|||
Assert.Contains("IdleTimeout", ex.Message);
|
||||
}
|
||||
|
||||
#if !NET10_0
|
||||
[Fact]
|
||||
#else
|
||||
[Fact(Skip = "https://github.com/modelcontextprotocol/csharp-sdk/issues/823")]
|
||||
#endif
|
||||
public async Task NegativeMaxIdleSessionCount_Throws_ArgumentOutOfRangeException()
|
||||
{
|
||||
Builder.Services.AddMcpServer().WithHttpTransport(options =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue