Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve PipeWriterTests.CompleteWithLargeWriteThrows (#65506)
Allocate the buffer outside of the loop so we don't hit OOM issues. While looking at the test I noticed that it actually had a bug too: Nothing was asserting that we indeed throw an InvalidOperationException when the writer is completed. Adding `Assert.ThrowsAsync` revealed that the current loop iteration count was too low to hit the exception reliably within the 10ms delay so instead check for the execution time. Fixes #64930
- Loading branch information