Skip to content

Commit 21ef9f3

Browse files
authored
Revert "Fix flakiness in RequestsCanBeAbortedMidRead (#4881)" (#5708)
This was never supposed be be merged into release/2.2 or master since both those branches include aspnet/KestrelHttpServer#2844. This reverts commit 019ba08.
1 parent 647fbba commit 21ef9f3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,7 @@ await connection.Send("POST / HTTP/1.1",
709709
}
710710
}
711711

712-
var thrownEx = await Assert.ThrowsAnyAsync<Exception>(async () => await readTcs.Task).DefaultTimeout();
713-
714-
// https://github.com/aspnet/AspNetCore-Internal/issues/1521
715-
// In more recent versions of Kestrel, we expect this to always be a TaskCanceledException,
716-
// but without the changes in https://github.com/aspnet/KestrelHttpServer/pull/2844, this is flaky.
717-
Assert.True(thrownEx is TaskCanceledException || thrownEx is IOException, $"{thrownEx} is neither a TaskCanceledException nor IOException.");
712+
await Assert.ThrowsAsync<TaskCanceledException>(async () => await readTcs.Task);
718713

719714
// The cancellation token for only the last request should be triggered.
720715
var abortedRequestId = await registrationTcs.Task.DefaultTimeout();

0 commit comments

Comments
 (0)