Skip to content

Disconnect Google HTTP client test responses - #12372

Draft
AlexeyKuznetsov-DD wants to merge 1 commit into
masterfrom
alexeyk/close-google-http-client-test-responses
Draft

Disconnect Google HTTP client test responses#12372
AlexeyKuznetsov-DD wants to merge 1 commit into
masterfrom
alexeyk/close-google-http-client-test-responses

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Disconnects each synchronous Google HTTP client test response in a finally block after the callback and status code have been read.

Motivation

The synchronous V0 and V1 test helpers left HttpResponse instances open. On an abandoned reused connection, HttpURLConnection can transparently replay an idempotent GET, causing the test server to emit a second server trace for one logical client request.

Additional Notes

Failure evidence:

Condition failed with actual trace count 3 and expected trace count 2.

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:

./gradlew :dd-java-agent:instrumentation:google-http-client-1.19:forkedTest -PtestJvm=zulu8 --tests GoogleHttpClientV0ForkedTest --tests GoogleHttpClientV1ForkedTest --rerun-tasks
./gradlew :dd-java-agent:instrumentation:google-http-client-1.19:allTests -PtestJvm=zulu8 --rerun-tasks
./gradlew :dd-java-agent:instrumentation:google-http-client-1.19:spotlessCheck

Related instrumentation PRs: #914 and #2950.

Contributor Checklist

Jira ticket: N/A

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes inst: others All other instrumentations type: bug fix Bug fix labels Sep 2, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.81 s 14.76 s [-0.8%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 13.69 s 13.62 s [-0.3%; +1.3%] (no difference)
startup:petclinic:appsec:Agent 17.64 s 17.40 s [+0.4%; +2.3%] (maybe worse)
startup:petclinic:iast:Agent 17.52 s 17.58 s [-1.1%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 17.46 s 16.99 s [+1.6%; +4.0%] (significantly worse)
startup:petclinic:sca:Agent 17.51 s 16.97 s [-1.5%; +7.9%] (no difference)
startup:petclinic:tracing:Agent 16.67 s 16.66 s [-1.0%; +1.1%] (no difference)

Commit: 81d226be · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant