Skip to content

Migrate utils module Groovy tests to Java tests#11569

Draft
sarahchen6 wants to merge 6 commits into
masterfrom
sarahchen6/migrate-utils-tests
Draft

Migrate utils module Groovy tests to Java tests#11569
sarahchen6 wants to merge 6 commits into
masterfrom
sarahchen6/migrate-utils-tests

Conversation

@sarahchen6
Copy link
Copy Markdown
Contributor

What Does This Do

Migrate Groovy tests in the utils module to Java without changing any functionality

Introduce TableTest converter for boxed values

Motivation

This is part of a broader initiative to migrate all testing in this repo to JUnit

Additional Notes

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@sarahchen6 sarahchen6 added comp: testing Testing tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM labels Jun 4, 2026
}

@ParameterizedTest
@MethodSource("convertIterableMapAndBitSetArguments")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

wasn't sure how to convert this to a TableTest in a simple manner since the method takes multiple types... let me know if you have recommendations!

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Jun 4, 2026

🟢 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 13.96 s 13.98 s [-1.0%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 12.84 s 12.99 s [-2.0%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 16.52 s 16.23 s [+0.9%; +2.7%] (maybe worse)
startup:petclinic:iast:Agent 16.62 s 16.55 s [-1.0%; +1.7%] (no difference)
startup:petclinic:profiling:Agent 16.26 s 16.47 s [-2.8%; +0.3%] (no difference)
startup:petclinic:tracing:Agent 15.71 s 15.11 s [-4.8%; +12.7%] (unstable)

Commit: 54ccc2aa · 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.

StableConfigSource stableConfigSource =
new StableConfigSource(filePath.toString(), ConfigOrigin.LOCAL_STABLE_CONFIG);

// Create ConfigProvider via reflection (constructor is private)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the alternative was having this test file a stableconfig subfolder so that package-private safeToString() can be accessed 🤔

// spotless:on

@ParameterizedTest
@MethodSource("containerInfoParsedFromFileContentArguments")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This MethodSource was kept for readability -- TableTest requires inputs to be on one line

@datadog-datadog-prod-us1-2

This comment has been minimized.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant