Skip to content

Commit

Permalink
[HTTP/3] Reenable ResponseCancellation_ServerReceivesCancellation
Browse files Browse the repository at this point in the history
Since dotnet#57156 enforced sending RequestCancelled HTTP response code when disposing the stream, we no longer need to check for the 0xffffffff error code.

Fixes dotnet#56194
  • Loading branch information
rzikm committed Apr 4, 2022
1 parent d9b8a09 commit f4a5640
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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<HttpHeaderData>();
headers.Append(new HttpHeaderData("Content-Length", contentLength.ToString(CultureInfo.InvariantCulture)));
Expand All @@ -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<QuicStreamAbortedException>(() => SendDataForever(stream).WaitAsync(TimeSpan.FromSeconds(10)));
Assert.Equal((type == CancellationType.CancellationToken ? 268 : 0xffffffff), ex.ErrorCode);
Assert.Equal(268, ex.ErrorCode);
serverDone.Release();
});
Expand Down

0 comments on commit f4a5640

Please sign in to comment.