Make Basic auth credential-refresh test orchestration deterministic - #134414
Merged
rzikm merged 1 commit intoSep 24, 2026
Merged
Conversation
Observe client failures alongside both authentication rounds, send GOAWAY before responses, and clean up pending peers without losing the primary failure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The reviewed test changes have no unresolved approval-blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
This test-only PR makes Basic authentication credential-refresh orchestration deterministic.
Changes:
- Coordinates client requests with server authentication rounds.
- Sends GOAWAY before responses to force retry connections.
- Improves cleanup, response disposal, and diagnostics.
| File | Description |
|---|---|
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.BasicAuth.cs |
Updates Basic auth test orchestration and cleanup. |
This was referenced Sep 23, 2026
ManickaP
approved these changes
Sep 24, 2026
Member
Author
|
/ba-g Test failure is unrelated |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RefreshesPreAuthCredentialsOnChangewaits for the server before observing the client request, which can hide an earlier client failure behind a connection-operation timeout. Its response-before-GOAWAY ordering also lets an authentication retry reuse a connection while the test expects a new one.This change observes each client request alongside both of its server authentication rounds, sends GOAWAY with the received stream ID before each response, and retains server ownership of accepted connections for failure cleanup. It preserves the credential-mutation barrier and authentication assertions, disposes responses, and adds connection/stream progress diagnostics.
Related to #133098. Controlled experiments reproduced exception masking and same-connection retry, but did not establish the cause of every historical CI timeout. This is a test-only change; credential-cache behavior is unchanged.
Validation
clr+libs -rc releasebaseline and final test build succeeded.Note
This pull request was prepared with GitHub Copilot assistance.