Skip to content

Commit b782842

Browse files
authored
Update exception caught in HTTP2 tests
1 parent 1f32895 commit b782842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Servers/Kestrel/test/Interop.FunctionalTests/HttpClientHttp2InteropTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ public async Task ServerReset_BeforeRequestBodyEnd_ClientBodyThrows(string schem
798798
await serverReset.Task.DefaultTimeout();
799799
var responseEx = await Assert.ThrowsAsync<HttpRequestException>(() => response.Content.ReadAsStringAsync().DefaultTimeout());
800800
Assert.Contains("The HTTP/2 server reset the stream. HTTP/2 error code 'CANCEL' (0x8)", responseEx.ToString());
801-
await Assert.ThrowsAsync<TaskCanceledException>(() => streamingContent.SendAsync("Hello World").DefaultTimeout());
801+
await Assert.ThrowsAsync<IOException>(() => streamingContent.SendAsync("Hello World").DefaultTimeout());
802802
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => clientEcho.Task.DefaultTimeout());
803803

804804
await host.StopAsync().DefaultTimeout();
@@ -932,7 +932,7 @@ public async Task ClientReset_BeforeResponse_ResponseSuppressed(string scheme)
932932
await requestReceived.Task.DefaultTimeout();
933933
requestCancellation.Cancel();
934934
await serverResult.Task.DefaultTimeout();
935-
await Assert.ThrowsAsync<TaskCanceledException>(() => requestTask).DefaultTimeout();
935+
await Assert.ThrowsAsync<IOException>(() => requestTask).DefaultTimeout();
936936

937937
await host.StopAsync().DefaultTimeout();
938938
}

0 commit comments

Comments
 (0)