Add collector connection TTL and recovery tests - #3081
Conversation
Signed-off-by: Pong Lam <pg051285@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3081 +/- ##
=============================================
+ Coverage 37.95% 70.98% +33.02%
- Complexity 5532 10853 +5321
=============================================
Files 873 873
Lines 43135 43406 +271
Branches 6526 6572 +46
=============================================
+ Hits 16373 30811 +14438
+ Misses 24482 9633 -14849
- Partials 2280 2962 +682 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Pong Lam <pg051285@gmail.com>
Signed-off-by: Pong Lam <pg051285@gmail.com>
jtduffy
left a comment
There was a problem hiding this comment.
Thank you for the PR. I've requested some changes below.
Signed-off-by: Pong Lam <pg051285@gmail.com>
Signed-off-by: Pong Lam <pg051285@gmail.com>
|
Follow-up on the remaining failed check: The corresponding failure for this PR commit is here: https://github.com/newrelic/newrelic-java-agent/actions/runs/33777015267/job/100782407867 The HTTP4s AIT exercises the separate HTTP4s Ember client instrumentation; this PR changes the collector transport based on Apache HttpClient. The unit, functional, and instrumentation matrices—including Java 11 |
Before contributing, please read our contributing guidelines and code of conduct.
Overview
Adds a configurable maximum lifetime for pooled collector connections to prevent reuse of connections that have been silently terminated by an intermediary such as a proxy, firewall, or load balancer.
The new
collector_connection_ttlsetting:0, preserving the existing unlimited connection lifetime.newrelic.yml, thenewrelic.config.collector_connection_ttlsystem property, or theNEW_RELIC_COLLECTOR_CONNECTION_TTLenvironment variable.The PR also adds parameterized connection-lifecycle and recovery tests:
Related GitHub Issue
N/A
Testing
The following focused test suites were run locally:
git diff --checkpassed.The complete repository test suite was not run locally. GitHub Actions will run the broader suite when the pull request is opened.
Checks
This PR adds Testcontainers 1.21.3 and its Toxiproxy module as test-only dependencies. They are used exclusively for TCP fault-injection integration tests and are not included in the Java agent runtime or distribution. Jetty was already present as a test dependency.