Prepare to 0 byte flush change (#2442)
This commit is contained in:
parent
cc8c140cca
commit
7b3491e11e
|
|
@ -84,11 +84,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
||||||
[InlineData(null, new byte[0])]
|
[InlineData(null, new byte[0])]
|
||||||
public void EncodesAsAscii(string input, byte[] expected)
|
public void EncodesAsAscii(string input, byte[] expected)
|
||||||
{
|
{
|
||||||
var writerBuffer = _pipe.Writer;
|
var pipeWriter = _pipe.Writer;
|
||||||
var writer = new BufferWriter<PipeWriter>(writerBuffer);
|
var writer = new BufferWriter<PipeWriter>(pipeWriter);
|
||||||
writer.WriteAsciiNoValidation(input);
|
writer.WriteAsciiNoValidation(input);
|
||||||
writer.Commit();
|
writer.Commit();
|
||||||
writerBuffer.FlushAsync().GetAwaiter().GetResult();
|
pipeWriter.FlushAsync().GetAwaiter().GetResult();
|
||||||
|
pipeWriter.Complete();
|
||||||
|
|
||||||
var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult();
|
var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
if (expected.Length > 0)
|
if (expected.Length > 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue