This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Http2: Fix remote server tests occassionally timing out in CI #39588
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,12 +115,12 @@ protected static object GetUnderlyingSocketsHttpHandler(HttpClientHandler handle | |
|
||
public static readonly IEnumerable<object[]> RemoteServersMemberData = Configuration.Http.RemoteServersMemberData; | ||
|
||
protected HttpClient CreateHttpClientForRemoteServer(Configuration.Http.RemoteServer remoteServer) | ||
protected HttpClient CreateHttpClientForRemoteServer(Configuration.Http.RemoteServer remoteServer, TimeSpan? timeout = null) | ||
{ | ||
return CreateHttpClientForRemoteServer(remoteServer, CreateHttpClientHandler()); | ||
return CreateHttpClientForRemoteServer(remoteServer, CreateHttpClientHandler(), timeout); | ||
} | ||
|
||
protected HttpClient CreateHttpClientForRemoteServer(Configuration.Http.RemoteServer remoteServer, HttpClientHandler httpClientHandler) | ||
protected HttpClient CreateHttpClientForRemoteServer(Configuration.Http.RemoteServer remoteServer, HttpClientHandler httpClientHandler, TimeSpan? timeout = null) | ||
{ | ||
HttpMessageHandler wrappedHandler = httpClientHandler; | ||
|
||
|
@@ -133,6 +133,11 @@ protected HttpClient CreateHttpClientForRemoteServer(Configuration.Http.RemoteSe | |
|
||
var client = new HttpClient(wrappedHandler); | ||
SetDefaultRequestVersion(client, remoteServer.HttpVersion); | ||
if (timeout.HasValue) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than pass this in and set it here, can we just have callers set it directly on the HttpClient? This is generally what we do for other settings on HttpClient. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, that should simplify the changes significantly. |
||
{ | ||
client.Timeout = timeout.Value; | ||
} | ||
|
||
return client; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Unless we're leaving the issue open, we shouldn't tag the issue like this. Otherwise it looks like it's an ActiveIssue. It's fine to link to the issue for more info, but we should comment something like:
"Because [reasons], test can take very long to run, particularly in CI. See github issue [link] for more information."
That said, there isn't really any additional info in the github issue other than "this test takes a long time" so I'm not sure it's actually worth linking. The comment itself is pretty self explanatory.
Same comment below in the other test.
(edited for clarity)
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.
Thanks, will adjust wording.