Fix ContentLength_Received_ReadViaPipes (#8893)
This commit is contained in:
parent
248d4e70a2
commit
a5791da8d3
|
|
@ -1016,14 +1016,18 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
||||||
Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException);
|
Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[Fact]
|
||||||
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000
|
|
||||||
public async Task ContentLength_Received_ReadViaPipes()
|
public async Task ContentLength_Received_ReadViaPipes()
|
||||||
{
|
{
|
||||||
await InitializeConnectionAsync(async context =>
|
await InitializeConnectionAsync(async context =>
|
||||||
{
|
{
|
||||||
var readResult = await context.Request.BodyReader.ReadAsync();
|
var readResult = await context.Request.BodyReader.ReadAsync();
|
||||||
Assert.True(readResult.IsCompleted);
|
while (!readResult.IsCompleted)
|
||||||
|
{
|
||||||
|
context.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
|
||||||
|
readResult = await context.Request.BodyReader.ReadAsync();
|
||||||
|
}
|
||||||
|
|
||||||
Assert.Equal(12, readResult.Buffer.Length);
|
Assert.Equal(12, readResult.Buffer.Length);
|
||||||
context.Request.BodyReader.AdvanceTo(readResult.Buffer.End);
|
context.Request.BodyReader.AdvanceTo(readResult.Buffer.End);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue