Repository navigation
WinHttpHandler tests are back - #1676
Conversation
# Conflicts: # src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj
|
/azp list |
|
/azp run runtime-libraries outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-libraries outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-libraries outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-libraries outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
No failed tests, cancelled due to timeouts. |
# Conflicts: # src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.DefaultProxyCredentials.cs # src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs # src/libraries/Common/tests/System/Net/Http/SchSendAuxRecordHttpTest.cs # src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/PlatformHandlerTest.cs
scalablecory
left a comment
There was a problem hiding this comment.
using HttpClientHandler = System.Net.Http.WinHttpClientHandler; is a bit fun but I can't think of a better way to do this without more invasive changes.
This looks good to me.
| // Propagate exception for debugging | ||
| task.GetAwaiter().GetResult(); | ||
| // With WinHttpHandler, we may fault because canceling the task destroys the request handle | ||
| // which may randomly cause an ObjectDisposedException (or other exception). |
There was a problem hiding this comment.
Seeing an ObjectDisposedException upon cancellation seems like a bug. @davidsh do you know anything about this behavior?
There was a problem hiding this comment.
Note that this is just taken from before WinHttpHandler removal in this commit. As is every other condition returned to the tests.
Yep, the lesser evil 😄 |
The tests used by
PlatformHandlerTestmoved to Common/tests in order to share them between System.Net.Http and System.Net.Http.WinHttpHandler.The added conditions correspond to the state before WinHttpHandler removal. They're just based on
IsWinHttpHandlerinstead ofUseSocketHandler.Some of the code must be conditionally compiled since there is no usable common base class for
HttpClientHandlerandWinHttpHandler. Other issues solved by introducingWinHttpClientHandlerfor testing purposes. It corresponds to HttpClientHandler.Windows.cs code from before its removal.Resolves #339