diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/ChunkedResponseTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/ChunkedResponseTests.cs index 383bb631a3..12f0dddd95 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/ChunkedResponseTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/ChunkedResponseTests.cs @@ -476,7 +476,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests var response = httpContext.Response; await response.StartAsync(); - var memory = response.BodyPipe.GetMemory(5000); // This will return 4089 + var memory = response.BodyPipe.GetMemory(); // This will return 4089 var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); fisrtPartOfResponse.CopyTo(memory); response.BodyPipe.Advance(memory.Length); @@ -525,7 +525,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests await response.BodyPipe.FlushAsync(); - var memory = response.BodyPipe.GetMemory(5000); // This will return 4089 + var memory = response.BodyPipe.GetMemory(); // This will return 4089 var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); fisrtPartOfResponse.CopyTo(memory); response.BodyPipe.Advance(memory.Length); diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs index 5ef31c8944..a35fdb388b 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs @@ -2530,7 +2530,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests var response = httpContext.Response; await response.StartAsync(); - var memory = response.BodyPipe.GetMemory(5000); + var memory = response.BodyPipe.GetMemory(); Assert.Equal(4096, memory.Length); var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); fisrtPartOfResponse.CopyTo(memory); @@ -2584,7 +2584,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests await response.BodyPipe.FlushAsync(); - var memory = response.BodyPipe.GetMemory(5000); + var memory = response.BodyPipe.GetMemory(); var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); fisrtPartOfResponse.CopyTo(memory); response.BodyPipe.Advance(memory.Length); @@ -2783,7 +2783,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests var memory = response.BodyPipe.GetMemory(0); Assert.Equal(4096, memory.Length); - memory = response.BodyPipe.GetMemory(1000000); + memory = response.BodyPipe.GetMemory(4096); Assert.Equal(4096, memory.Length); });