-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
protected override bool UseSocketsHttpHandler => true; | ||
|
||
// TODO: Currently the subsequent tests sometimes fail/hang with WinHttpHandler / CurlHandler. | ||
// In theory they should pass with any handler that does appropriate connection pooling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue number for this TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not. I'll open one.
57cb2d8
to
578d6c5
Compare
|
||
// Make second request and expect it to be served from a different connection. | ||
Task<string> request2 = client.GetStringAsync(uri); | ||
await LoopbackServer.AcceptSocketAsync(listener, async (server2, serverStream2, serverReader2, serverWriter2) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AcceptSocketAsync [](start = 49, length = 17)
Q: this is a pattern in most of the tests, but in case of client/handler bug the call to AcceptSocketAsync can cause the test to hang. Is there any reason to not add a timeout on the AcceptAsync()
call on LoopbackServer.AcceptSocketAsync
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do that, we would just want it to be really long, like a minute.
protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap && !PlatformDetection.IsFullFramework; | ||
protected bool IsCurlHandler => !UseSocketsHttpHandler && !PlatformDetection.IsWindows; | ||
protected bool IsNetfxHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && PlatformDetection.IsFullFramework; | ||
protected bool IsUapHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && PlatformDetection.IsUap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I didn't know that a rename was coming, it is welcome.
LGTM |
@dotnet-bot test Windows x64 Debug Build please |
- Renames ManagedHandler to SocketsHttpHandler - Moves a bunch of files around accordingly - Updates System.Net.WebSockets.Client to use SocketsHttpHandler directly - Updates System.Net.Http's tests with a reflection-based rather than TLS-based method for instantiating an HttpClientHandler backed by a SocketsHttpHandler.
54dc1be
to
f6f5188
Compare
@dotnet/dnceng, my legs are failing with errors like this: Using context: Windows x86 Release Build |
@stephentoub : @riarenas was working on this and ended up rebooting ci3.dot.net. Let's try a retry first? @dotnet-bot test please |
@dotnet-bot test this please |
…handler Expose SocketsHttpHandler Commit migrated from dotnet/corefx@eb89247
cc: @geoffkizer, @davidsh, @Priya91, @wfurt, @karelz
Closes https://github.com/dotnet/corefx/issues/23166
Closes https://github.com/dotnet/corefx/issues/26895
Closes https://github.com/dotnet/corefx/issues/26960