Forward JUnit 5 report entries to the original listener - #12697
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
Conversation
e3d5c37 to
f20c893
Compare
CI Visibility Test Environment - sbt-scalatestJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - nebula-release-pluginJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - netflix-zuulJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - pass4sJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - reactive-streams-jvmJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
CI Visibility Test Environment - heliboardJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - sonar-kotlinJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - jolokiaJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - okhttpJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - spring_bootJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - sonar-javaJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The corrected callback forwards each report entry with its original descriptor and payload, while the regression coverage also verifies that no spurious dynamic-test registration occurs.
🤖 Bits Code Review · Commit 369f4e8 · @DataDog review to ask questions
|
/merge |
|
View all feedbacks in Devflow UI.
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
The expected merge time in
|
What Does This Do
Forwards JUnit 5 report entries to the original engine listener when CI Visibility is enabled.
CompositeEngineListenerwraps JUnit's own listener so our tracing listener also sees execution events. ItsreportingEntryPublishedmethod calleddelegate.dynamicTestRegistered(testDescriptor)instead ofdelegate.reportingEntryPublished(testDescriptor, entry). This PR calls the right method.Motivation
With the tracer attached, the bug had two effects:
TestReporter.publishEntry(...)never reached the JUnit launcher, so build tools, IDEs and test reports lost them.SummaryGeneratingListenerincrementstestsFound.This affects JUnit 5, Spock and Cucumber, since all three instrumentations use this class. Users don't need to change anything.
Additional Notes
JUnit5Testhas a new case. It runs a fixture that callsTestReporter.publishEntry("key", "value")through the real launcher with the agent attached. It checks that launcher listeners receive exactly that entry and that no dynamic test is registered.runTestsnow returns its result listener, which also records report entries and dynamic registrations. Existing callers ignore the return value.spotlessCheckpasses and allJUnit5Testcases pass intest,v513Test,latest5TestandlatestDepTest(JUnit up to 6.1.3). Spock and Cucumber share the fixed class but have no dedicated check.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue