Skip to content

Migrate internal-api groovy files to java part 8 - #13054

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
jpbempel/g2j-internal-api-pt8
Oct 26, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
jpbempel/g2j-internal-api-pt8

Conversation

@jpbempel

Copy link
Copy Markdown
Member

What Does This Do

we migrate 11 tests:

  • ConfigInversionMetricCollectorImplTest
  • CoreMetricCollectorBaggageTest
  • CoreMetricCollectorTest
  • EndpointCollectorTest
  • IntegrationsCollectorTest
  • MetricCollectorTest
  • OtelEnvMetricCollectorImplTest
  • ProductChangeCollectorTest
  • ProductChangeTest
  • WafMetricCollectorTest
  • JDK9StackWalkerTest (internal-api-9)

Motivation

this is part of the effort to migrate groovy tests to Java/JUnit
part1: #12663
part2: #12766
part3: #12826
part4: #12839
part5: #12866
part6: #12916
part7: #12952

Additional Notes

No production code change. Groovy tests accessed private members that Java tests cannot reach, so:

  • IntegrationsCollectorTest and ProductChangeCollectorTest fill the collector through the public update() method instead of the private queue
  • ConfigInversionMetricCollectorImplTest asserts the metric name literal instead of the private CONFIG_INVERSION_METRIC_NAME constant
  • ConfigInversionMetricCollectorTestHelper moved from the groovy to the java test source set

Spock runs feature methods in declaration order, JUnit does not, and these collectors are singletons:

  • CoreMetricCollectorTest and WafMetricCollectorTest flush pending metrics in a @BeforeEach
  • WafMetricCollectorTest runs the framework cardinality cap test last (@Order), as the per-framework counters are never evicted

Contributor Checklist

Jira ticket: [PROJ-IDENT]

🤖 Generated with Claude Code

we migrate 11 tests:
 - ConfigInversionMetricCollectorImplTest
 - CoreMetricCollectorBaggageTest
 - CoreMetricCollectorTest
 - EndpointCollectorTest
 - IntegrationsCollectorTest
 - MetricCollectorTest
 - OtelEnvMetricCollectorImplTest
 - ProductChangeCollectorTest
 - ProductChangeTest
 - WafMetricCollectorTest
 - JDK9StackWalkerTest

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jpbempel jpbempel added comp: testing Testing tag: no release notes Changes to exclude from release notes type: refactoring tag: ai generated Largely based on code generated by an AI or LLM labels Oct 26, 2026
@jpbempel
jpbempel marked this pull request as ready for review October 26, 2026 09:25
@jpbempel
jpbempel requested review from a team as code owners October 26, 2026 09:25
@jpbempel
jpbempel requested review from claponcet, dromanol and mtoffl01 and removed request for a team October 26, 2026 09:25
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-26T09:25:25.681477Z a993e6b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The migrated tests preserve the original cases and assertions, with singleton cleanup and ordering adjustments for JUnit. No human PR discussion raised additional concerns.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit a993e6b

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.99% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 15bccb7 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 26, 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.00 s 14.01 s [-0.8%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.97 s 13.06 s [-1.4%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 17.72 s 17.65 s [-0.7%; +1.6%] (no difference)
startup:petclinic:iast:Agent 17.55 s 17.69 s [-1.6%; +0.1%] (no difference)
startup:petclinic:profiling:Agent 17.36 s 17.28 s [-0.7%; +1.7%] (no difference)
startup:petclinic:sca:Agent 17.79 s 17.63 s [+0.1%; +1.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.61 s 16.80 s [-2.2%; -0.0%] (maybe better)

Commit: 15bccb7f · 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.

Comment thread internal-api/src/test/java/datadog/trace/api/telemetry/EndpointCollectorTest.java Outdated
@jpbempel
jpbempel enabled auto-merge October 26, 2026 13:06
@jpbempel
jpbempel added this pull request to the merge queue Oct 26, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-26 13:59:31 UTC ℹ️ Start processing command /merge


2026-10-26 13:59:36 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-10-26 15:23:51 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 26, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 7484f9b into master Oct 26, 2026
609 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the jpbempel/g2j-internal-api-pt8 branch October 26, 2026 15:23
@github-actions github-actions Bot added this to the 1.69.0 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants