Skip to content

Commit ca26340

Browse files
committed
Quarantine Http1Connection_ServerAbort_HasErrorType
1 parent ee7fabd commit ca26340

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ await connection.ReceiveEnd(
391391
}
392392

393393
[Fact]
394+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/58086")]
394395
public async Task Http1Connection_ServerAbort_HasErrorType()
395396
{
396397
var testMeterFactory = new TestMeterFactory();
@@ -399,17 +400,21 @@ public async Task Http1Connection_ServerAbort_HasErrorType()
399400
var serviceContext = new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory));
400401

401402
var sendString = "POST / HTTP/1.0\r\nContent-Length: 12\r\n\r\nHello World?";
403+
var readBodyTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
402404

403-
await using var server = new TestServer(c =>
405+
await using var server = new TestServer(async c =>
404406
{
407+
await c.Request.Body.ReadUntilEndAsync();
408+
readBodyTcs.SetResult();
405409
c.Abort();
406-
return Task.CompletedTask;
407410
}, serviceContext);
408411

409412
using (var connection = server.CreateConnection())
410413
{
411414
await connection.Send(sendString).DefaultTimeout();
412415

416+
await readBodyTcs.Task.DefaultTimeout();
417+
413418
await connection.ReceiveEnd().DefaultTimeout();
414419

415420
await connection.WaitForConnectionClose().DefaultTimeout();

0 commit comments

Comments
 (0)