Skip to content

Commit

Permalink
[HTTP/3] Reenable ResponseCancellation_ServerReceivesCancellation (#6…
Browse files Browse the repository at this point in the history
…7535)

Since #57156 enforced sending RequestCancelled HTTP response code when disposing the stream, we no longer need to check for the 0xffffffff error code.
  • Loading branch information
rzikm authored Apr 12, 2022
1 parent ff4d3d4 commit f04bf3b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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<HttpHeaderData>();
headers.Append(new HttpHeaderData("Content-Length", contentLength.ToString(CultureInfo.InvariantCulture)));

Expand All @@ -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<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 f04bf3b

Please sign in to comment.