Skip to content

Migrate agent-bootstrap groovy files to java part 2 - #13187

Open
jpbempel wants to merge 3 commits into
masterfrom
jpbempel/g2j-agent-bootstrap-pt2
Open

jpbempel wants to merge 3 commits into
masterfrom
jpbempel/g2j-agent-bootstrap-pt2

Conversation

@jpbempel

@jpbempel jpbempel commented Nov 3, 2026

Copy link
Copy Markdown
Member

What Does This Do

we migrate 7 tests:

  • InjectingPipeOutputStreamTest
  • InjectingPipeWriterTest
  • SharedDBCommenterForkedTest
  • NamedContextTest
  • HostNameResolverForkedTest
  • SessionStateTest
  • UnionMapTest

Motivation

this is part of the effort to migrate groovy tests to Java/JUnit

Additional Notes

Second batch of Groovy tests from dd-java-agent/agent-bootstrap; test counts are unchanged:

  • Spock where: tables become @TableTest; rows that need built InetAddress objects use @MethodSource
  • Spock Mock(...) becomes Mockito; 0 * _ becomes verifyNoMoreInteractions, and _ is only mapped to any()
  • System.setProperty for service/env/version in SharedDBCommenterForkedTest becomes class-level @WithConfig
  • HostNameResolverForkedTest used package-private Inet4Address/Inet6Address constructors; it now uses the public InetAddress.getByAddress(host, bytes), with an IPv6 loopback for the IPv6 cases
  • SessionStateTest read the private timeInQueueSpanCount field, so SessionState gets a package-private getTimeInQueueSpanCount() accessor next to the existing test-only getCapturedSpanCount()

Contributor Checklist

Jira ticket: [PROJ-IDENT]

🤖 Generated with Claude Code

we migrate 7 tests:
 - InjectingPipeOutputStreamTest
 - InjectingPipeWriterTest
 - SharedDBCommenterForkedTest
 - NamedContextTest
 - HostNameResolverForkedTest
 - SessionStateTest
 - UnionMapTest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 Nov 3, 2026
@jpbempel
jpbempel marked this pull request as ready for review November 3, 2026 19:11
@jpbempel
jpbempel requested review from a team as code owners November 3, 2026 19:11
@jpbempel
jpbempel requested review from ValentinZakharov and daniel-mohedano and removed request for a team November 3, 2026 19:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

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 ✅ Completed 2026-11-03T19:17:28.191958Z b6360cf 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.

@jpbempel
jpbempel requested review from jandro996 and sarahchen6 and removed request for a team November 3, 2026 19:11

@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: FAIL

The migrated hostname fixtures fail when the local hostname resolves to IPv6: both rows labeled IPv4 construct an Inet6Address and fail their type assertion before testing the resolver.

Open Bits AI session

🤖 Bits Code Review · Commit b6360cf

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6360cf34d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

InetAddress.getLocalHost() may resolve to an IPv6 address, which made the
IPv4 cases build an Inet6Address and fail their type check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.91% (+0.00%)

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

@dd-octo-sts

dd-octo-sts Bot commented Nov 3, 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.07 s 13.97 s [-0.0%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 12.96 s 12.97 s [-0.9%; +0.8%] (no difference)
startup:petclinic:appsec:Agent 17.83 s 17.65 s [-0.0%; +2.0%] (no difference)
startup:petclinic:iast:Agent 17.56 s 17.73 s [-1.9%; +0.1%] (no difference)
startup:petclinic:profiling:Agent 17.33 s 17.38 s [-1.4%; +0.8%] (no difference)
startup:petclinic:sca:Agent 17.71 s 17.09 s [-0.9%; +8.1%] (no difference)
startup:petclinic:tracing:Agent 16.73 s 16.87 s [-1.9%; +0.2%] (no difference)

Commit: 5c4e5b06 · 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.

@sarahchen6 sarahchen6 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.

One note to keep DDSpecification / DDJavaSpecification for setup / cleanup, but otherwise LGTM

This branch has not been deployed

No deployments
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.

2 participants