From f04bf3b5da2c4b9596acf972e512c18947525a01 Mon Sep 17 00:00:00 2001 From: Radek Zikmund <32671551+rzikm@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:48:04 +0200 Subject: [PATCH] [HTTP/3] Reenable ResponseCancellation_ServerReceivesCancellation (#67535) Since #57156 enforced sending RequestCancelled HTTP response code when disposing the stream, we no longer need to check for the 0xffffffff error code. --- .../tests/FunctionalTests/HttpClientHandlerTest.Http3.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs index a32b3d827e6a9..b458e711de20e 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs @@ -678,7 +678,6 @@ public enum CancellationType } [ConditionalTheory(nameof(IsMsQuicSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/56194")] [InlineData(CancellationType.Dispose)] [InlineData(CancellationType.CancellationToken)] public async Task ResponseCancellation_ServerReceivesCancellation(CancellationType type) @@ -700,7 +699,7 @@ public async Task ResponseCancellation_ServerReceivesCancellation(CancellationTy HttpRequestData request = await stream.ReadRequestDataAsync().ConfigureAwait(false); - int contentLength = 2*1024*1024; + int contentLength = 2 * 1024 * 1024; var headers = new List(); headers.Append(new HttpHeaderData("Content-Length", contentLength.ToString(CultureInfo.InvariantCulture))); @@ -714,7 +713,7 @@ public async Task ResponseCancellation_ServerReceivesCancellation(CancellationTy // We are asserting that PEER_RECEIVE_ABORTED would still arrive eventually var ex = await Assert.ThrowsAsync(() => SendDataForever(stream).WaitAsync(TimeSpan.FromSeconds(10))); - Assert.Equal((type == CancellationType.CancellationToken ? 268 : 0xffffffff), ex.ErrorCode); + Assert.Equal(268, ex.ErrorCode); serverDone.Release(); });