Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public async Task POST_ClientCancellationUpload_RequestAbortRaised(HttpProtocols
// Arrange
var syncPoint = new SyncPoint();
var cancelledTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var readAsyncTask = new TaskCompletionSource<Task>(TaskCreationOptions.RunContinuationsAsynchronously);
var readAsyncTask = new TaskCompletionSource<Task<int>>(TaskCreationOptions.RunContinuationsAsynchronously);

var builder = CreateHostBuilder(async context =>
{
Expand Down Expand Up @@ -519,8 +519,15 @@ public async Task POST_ClientCancellationUpload_RequestAbortRaised(HttpProtocols

var serverReadTask = await readAsyncTask.Task.DefaultTimeout();

var serverEx = await Assert.ThrowsAsync<IOException>(() => serverReadTask).DefaultTimeout();
Assert.Equal("The client reset the request stream.", serverEx.Message);
try
{
int bytesRead = await serverReadTask;
Assert.Equal(0, bytesRead);
}
catch (IOException ex)
{
Assert.Equal("The client reset the request stream.", ex.Message);
}

await host.StopAsync().DefaultTimeout();
}
Expand Down
Loading