Skip to content

Commit 3cb7116

Browse files
committed
Quarantine and fix Http1Connection_RequestEndsWithIncompleteReadAsync
1 parent d05f358 commit 3cb7116

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Servers/Kestrel/test/InMemory.FunctionalTests/KestrelMetricsTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ await connection.ReceiveEnd(
159159
}
160160

161161
[Fact]
162+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/57944")]
162163
public async Task Http1Connection_RequestEndsWithIncompleteReadAsync()
163164
{
164165
var testMeterFactory = new TestMeterFactory();
@@ -171,7 +172,12 @@ public async Task Http1Connection_RequestEndsWithIncompleteReadAsync()
171172
await using var server = new TestServer(async context =>
172173
{
173174
var result = await context.Request.BodyReader.ReadAsync();
174-
await context.Response.BodyWriter.WriteAsync(result.Buffer.ToArray());
175+
176+
// The request body might be incomplete, but there should be something in the first read.
177+
Assert.True(result.Buffer.Length > 0);
178+
Assert.Equal(result.Buffer.ToSpan(), "Hello World?"u8[..(int)result.Buffer.Length]);
179+
180+
await context.Response.WriteAsync("Hello World?");
175181
// No BodyReader.Advance. Connection will fail when attempting to complete body.
176182
}, serviceContext);
177183

0 commit comments

Comments
 (0)