Disconnect Google HTTP client test responses - #12372
Conversation
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The new finally block disconnects each response after normal processing. It also disconnects the response when the callback or status-code read throws.
🤖 Datadog Autotest · Commit 539a0af · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
What Does This Do
Disconnects each synchronous Google HTTP client test response in a
finallyblock after the callback and status code have been read.Motivation
The synchronous V0 and V1 test helpers left
HttpResponseinstances open. On an abandoned reused connection,HttpURLConnectioncan transparently replay an idempotent GET, causing the test server to emit a second server trace for one logical client request.Additional Notes
Failure evidence:
The unexpected traces contained two server spans with the same client-span parent. Transport logging showed the first reused connection being abandoned and the GET being replayed on a new connection, which is consistent with the missing response cleanup.
Validation:
Related instrumentation PRs: #914 and #2950.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: N/A