Skip to content

Set up HttpClient for ClientWebSocket.ConnectAsync - #73387

Merged
greenEkatherine merged 6 commits into
dotnet:mainfrom
greenEkatherine:http-client-for-clientwebsocket
Aug 9, 2022
Merged

greenEkatherine merged 6 commits into
dotnet:mainfrom
greenEkatherine:http-client-for-clientwebsocket

Conversation

@greenEkatherine

@greenEkatherine greenEkatherine commented Aug 4, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #72476

Detecting if we get HttpClient as a parameter in ConnectAsync -- in that case another SendAsync method should be called to provide correct options.

Most part of PR is adding HttpClient/HttpMessageInvoker into all existing tests.

@ghost ghost added the area-System.Net.Http label Aug 4, 2022
@ghost ghost assigned greenEkatherine Aug 4, 2022
@ghost

ghost commented Aug 4, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #72301

Detecting if we get HttpClient as a parameter in ConnectAsync -- in that case another SendAsync method should be called to provide correct options.

Most part of PR is adding HttpClient/HttpMessageInvoker into all existing tests.

Author: greenEkatherine
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@ghost

ghost commented Aug 4, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #72301

Detecting if we get HttpClient as a parameter in ConnectAsync -- in that case another SendAsync method should be called to provide correct options.

Most part of PR is adding HttpClient/HttpMessageInvoker into all existing tests.

Author: greenEkatherine
Assignees: greenEkatherine
Labels:

area-System.Net

Milestone: -

…ockets/WebSocketHandle.Managed.cs

Co-authored-by: Miha Zupan <[email protected]>
@greenEkatherine

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@greenEkatherine

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MihaZupan MihaZupan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of duplication of ConnectAsync and GetConnectedWebSocket in tests.

Can they be implemented as helper methods on ClientWebSocketTestBase instead, with the only thing for tests to implement being

protected virtual HttpMessageInvoker? GetInvoker();

?

@greenEkatherine

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@greenEkatherine

Copy link
Copy Markdown
Contributor Author

Failures in the outerloop builds are unrelated

@greenEkatherine
greenEkatherine merged commit 2cb6c19 into dotnet:main Aug 9, 2022
@greenEkatherine
greenEkatherine deleted the http-client-for-clientwebsocket branch August 9, 2022 11:21
@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebSockets over HTTP/1.1 with HttpClient fails

5 participants