Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 7b3491e

Browse files
authored
Prepare to 0 byte flush change (#2442)
1 parent cc8c140 commit 7b3491e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/Kestrel.Core.Tests/PipelineExtensionTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ public void WritesNumericAcrossSpanBoundaries(int gapSize)
8484
[InlineData(null, new byte[0])]
8585
public void EncodesAsAscii(string input, byte[] expected)
8686
{
87-
var writerBuffer = _pipe.Writer;
88-
var writer = new BufferWriter<PipeWriter>(writerBuffer);
87+
var pipeWriter = _pipe.Writer;
88+
var writer = new BufferWriter<PipeWriter>(pipeWriter);
8989
writer.WriteAsciiNoValidation(input);
9090
writer.Commit();
91-
writerBuffer.FlushAsync().GetAwaiter().GetResult();
91+
pipeWriter.FlushAsync().GetAwaiter().GetResult();
92+
pipeWriter.Complete();
93+
9294
var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult();
9395

9496
if (expected.Length > 0)

0 commit comments

Comments
 (0)