diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index 687fa61ab06d2..b764d2419e09c 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -2119,7 +2119,7 @@ await server.AcceptConnectionAsync(async connection => [Fact] public async Task SendAsync_Expect100Continue_RequestBodyFails_ThrowsContentException() { - if (IsWinHttpHandler && UseVersion >= HttpVersion20.Value) + if (IsWinHttpHandler) { return; } @@ -2137,7 +2137,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = UseVersion }; initialMessage.Content = new ThrowingContent(() => new ThrowingContentException()); initialMessage.Headers.ExpectContinue = true; - Exception exception = await Assert.ThrowsAsync(() => client.SendAsync(TestAsync, initialMessage)); + await Assert.ThrowsAsync(() => client.SendAsync(TestAsync, initialMessage)); clientFinished.SetResult(true); }