Closed
Description
Describe the bug
When SyncronousIO is not enabled, Kestrel's HttpResponseStream's synchronous Flush method fails with an exception. TestServer's ResponseBodyWriterStream's synchronous Flush does not fail in same conditions. This causes TestServer to produce different behavior from Kestrel's.
This can create false positives in tests using TestServer.
Interestingly, IIS behaves same as TestServer, not Kestrel. Which of these should be correct behavior of synchronous Flush method?
To Reproduce
Demonstration code : https://github.com/Euphoric/TestServerFlushDemonstration
Further technical details
- ASP.NET Core version : 3.1.2