Fix slow shutdown when a Streamable HTTP client is connected (#843)

* Add "Async" suffix to async methods
This commit is contained in:
Stephen Halter 2025-10-10 17:50:57 -07:00 • committed by GitHub
commit e01edc143a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,9 +181,10 @@ public class MapMcpStreamableHttpTests(ITestOutputHelper outputHelper) : MapMcpT
await mcpClient.DisposeAsync();
// The header should be included in the GET request, the initialized notification, the tools/list call, and the delete request.
// The DELETE request won't be sent for Stateless mode due to the lack of an Mcp-Session-Id.
Assert.Equal(Stateless ? 3 : 4, protocolVersionHeaderValues.Count);
// The GET request might not have started in time, and the DELETE request won't be sent in
// Stateless mode due to the lack of an Mcp-Session-Id, but the header should be included in the
// initialized notification and the tools/list call at a minimum.
Assert.True(protocolVersionHeaderValues.Count > 1);
Assert.All(protocolVersionHeaderValues, v => Assert.Equal("2025-03-26", v));
}
}