Skip to content

Migrate dd-trace-ot tests to JUnit 5 - #11483

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
masterfrom
andrea.marziali/migrate-junit-ddtrace-ot
Jun 1, 2026
Merged

Migrate dd-trace-ot tests to JUnit 5#11483
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
masterfrom
andrea.marziali/migrate-junit-ddtrace-ot

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Migrates groovy tests in dd-trace-ot to Junit5

Motivation

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
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@amarziali
amarziali requested a review from a team as a code ownerMay 28, 2026 10:16
@amarzialiamarziali added comp: testing Testing tag: no release notes Changes to exclude from release notes labels May 28, 2026
@amarziali
amarziali requested review from mhlidd and removed request for a teamMay 28, 2026 10:16
@amarzialiamarziali added type: refactoring tag: ai generated Largely based on code generated by an AI or LLM labels May 28, 2026
@dd-octo-sts

dd-octo-stsBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

SuiteStatus
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
ScenarioCandidatemasterΔ (95% CI of mean)
startup:insecure-bank:iast:Agent14.04 s13.83 s[-0.1%; +3.1%] (no difference)
startup:insecure-bank:tracing:Agent12.86 s12.90 s[-1.3%; +0.7%] (no difference)
startup:petclinic:appsec:Agent16.54 s16.44 s[-0.8%; +2.1%] (no difference)
startup:petclinic:iast:Agent16.56 s16.56 s[-1.2%; +1.1%] (no difference)
startup:petclinic:profiling:Agent16.41 s16.54 s[-2.3%; +0.8%] (no difference)
startup:petclinic:tracing:Agent14.81 s15.79 s[-14.3%; +1.8%] (unstable)

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

@datadog-prod-us1-5

This comment has been minimized.

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

Left a few conversion-fidelity notes. These are about preserving the old Spock assertions, not expanding the test scope.

Comment threaddd-trace-ot/src/test/java/datadog/opentracing/DDTracerTest.java Outdated

@AlexeyKuznetsov-DDAlexeyKuznetsov-DD 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.

Left minor nit comments

@amarziali
amarzialiforce-pushed the andrea.marziali/migrate-junit-ddtrace-ot branch from fd00951 to 89d950fCompareMay 29, 2026 12:29
@amarziali
amarziali requested a review from a team as a code ownerMay 29, 2026 12:29
@gh-worker-ownership-write-b05516
gh-worker-ownership-write-b05516Bot removed the request for review from a teamMay 29, 2026 13:32

@AlexeyKuznetsov-DDAlexeyKuznetsov-DD 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.

LGTM
left minor comments

Comment on lines +33 to +34
ListWriter writer = new ListWriter();
Tracer tracer = DDTracer.builder().writer(writer).build();

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.

nit: private final?

Comment on lines +47 to +60
@SuppressWarnings("unchecked")
private static <T> T getField(Object obj, String fieldName) throws Exception {
Class<?> cls = obj.getClass();
while (cls != null) {
try {
Field field = cls.getDeclaredField(fieldName);
field.setAccessible(true);
return (T) field.get(obj);
} catch (NoSuchFieldException ignored) {
cls = cls.getSuperclass();
}
}
throw new NoSuchFieldException("Field " + fieldName + " not found on " + obj.getClass());
}

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.

optional: Probably looks like a good candidate to be in base class?

Comment threaddd-trace-ot/src/test/java/datadog/opentracing/DefaultLogHandlerTest.java Outdated
@amarziali
amarziali enabled auto-merge May 29, 2026 14:19
@jpbempel

jpbempel commented May 29, 2026

Copy link
Copy Markdown
Member

@amarziali once all tests of the module are migrated you need to add the module to this file: https://github.com/DataDog/dd-trace-java/pull/10787/changes#diff-3bcd5c5c739a45cfe3a5281b82797f6b8e36073cab801c6609f6e8a6508b858f

@amarziali

Copy link
Copy Markdown
ContributorAuthor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351Bot commented Jun 1, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-01 11:26:48 UTC ℹ️ Start processing command /merge


2026-06-01 11:26:58 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-06-01 12:15:11 UTC ℹ️ MergeQueue: merge request added to the queue

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


2026-06-01 13:26:01 UTC ℹ️ MergeQueue: This merge request was merged

@amarziali
amarzialiforce-pushed the andrea.marziali/migrate-junit-ddtrace-ot branch from 72a7093 to ddef681CompareJune 1, 2026 11:29
@amarziali
amarziali added this pull request to the merge queueJun 1, 2026
@dd-octo-sts

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351Bot commented Jun 1, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-01 12:14:27 UTC ℹ️ Start processing command /merge


2026-06-01 12:14:29 UTC ❌ MergeQueue

PR already in the queue with status waiting

@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Jun 1, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot merged commit 864ef84 into masterJun 1, 2026
572 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the andrea.marziali/migrate-junit-ddtrace-ot branch June 1, 2026 13:25
@github-actionsgithub-actionsBot added this to the 1.63.0 milestone Jun 1, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testingTestingtag: ai generatedLargely based on code generated by an AI or LLMtag: no release notesChanges to exclude from release notestype: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@amarziali@jpbempel@bric3@AlexeyKuznetsov-DD