From f4a5640f218d5d979f802cf5bad0d6403e92aecf Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Mon, 4 Apr 2022 16:21:26 +0200 Subject: [PATCH] [HTTP/3] Reenable ResponseCancellation_ServerReceivesCancellation Since #57156 enforced sending RequestCancelled HTTP response code when disposing the stream, we no longer need to check for the 0xffffffff error code. Fixes #56194 --- .../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 33e403afda88e..0114cd0dc55b3 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs @@ -679,7 +679,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) @@ -701,7 +700,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))); @@ -715,7 +714,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(); });