Skip to content

Run up to four JVMs per forked test task - #13559

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 22 commits into
masterfrom
alexeyk/parallelize-forked-tests
Nov 25, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 22 commits into
masterfrom
alexeyk/parallelize-forked-tests

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Run up to four test JVMs concurrently in each Gradle forked test task, subject to the build's worker limit. Each test class still runs in a fresh JVM. Testcontainers modules can override the fork count with their existing setting.

Motivation

#13536 introduced parallel forks for Testcontainers modules. Other forked suites, such as Akka HTTP, still paid JVM startup and test harness setup serially for every class. The project-wide default lets those suites overlap that work.

Additional Notes

Use unique discovery endpoints for Ignite and private runtime directories for Liberty and Mule so concurrent fixtures can start independently.

Compared matching jobs from this branch and a recent master run. Both runs executed tests fresh with the Gradle build cache enabled.

Scope Matched jobs Total job time change Total Gradle time change
All matching test jobs 169 −5.0% −8.3%
Instrumentation 48 −11.5% −15.0%
Latest-dependency instrumentation 30 −6.7% −10.3%
Instrumentation shard 2/8, across six JDKs 6 −28.8% −34.2%

Percentages compare summed durations. The published-artifacts job contributes only to job time because it invokes Gradle multiple times. Runner setup and cache reuse varied between runs. A focused local JDK 17 run of Akka HTTP's baseForkedTest observed four concurrent workers.

Contributor Checklist

Jira ticket: N/A

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: feature Enhancements and improvements 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 Nov 19, 2026
@datadog-datadog-us1-prod

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

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 61.19% (-0.03%)

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

@dd-octo-sts

dd-octo-sts Bot commented Nov 19, 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.82 s 14.75 s [-0.3%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 13.67 s 13.65 s [-0.7%; +1.1%] (no difference)
startup:petclinic:appsec:Agent 17.21 s 17.05 s [+0.2%; +1.7%] (maybe worse)
startup:petclinic:iast:Agent 17.15 s 16.53 s [-0.7%; +8.1%] (no difference)
startup:petclinic:profiling:Agent 16.64 s 16.84 s [-2.3%; -0.2%] (maybe better)
startup:petclinic:sca:Agent 17.23 s 17.16 s [-0.5%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.26 s 16.19 s [-0.4%; +1.2%] (no difference)

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

@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD force-pushed the alexeyk/parallelize-forked-tests branch from 4bf17c3 to 2e8055f Compare November 19, 2026 21:28
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD force-pushed the alexeyk/parallelize-forked-tests branch from 2e8055f to c478884 Compare November 19, 2026 23:29
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added the tag: override groovy enforcement Override the "Enforce Groovy Migration" check label Nov 20, 2026
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review November 20, 2026 00:29
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from a team as code owners November 20, 2026 00:29
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from ValentinZakharov, claponcet and sarahchen6 and removed request for a team November 20, 2026 00:29
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T00:33:49.480089Z 64e43ea Draft marked ready
🔒 Security Review ✅ Completed 2026-11-20T00:33:14.082109Z 64e43ea 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.

@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: 64e43ea5c9

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: FAIL

Mule test suites (MuleForkedTest, MuleHttpServerForkedTest, MuleHttpServerOTELEnabledForkedTest) can run concurrently with the new default Gradle worker count, but all forks share a single mule.base runtime directory and application name, so concurrent deployments and undeployments interfere with each other and cause flaky test failures. The fix is to set maxParallelForks = 1 for the relevant Mule tasks or provision a separate runtime directory per fork.

Open Bits AI session

🤖 Bits Code Review · Commit 64e43ea

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: FAIL

The new fork default can make the two Synapse specs delete the same log directory concurrently, turning passing assertions into an intermittent teardown failure.

Open Bits AI session

🤖 Bits Code Review · Commit c034c37

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: PASS

More details

The PR enables four concurrent JVMs per forked task while preserving per-class isolation and Testcontainers overrides. Ignite, Liberty, and Mule fixtures are isolated; Synapse logs now use task temporary directories and resources load from the classpath. The earlier Mule race remains fixed, with no open findings.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 3a62709

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

Looks okay to me!

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: FAIL

Forked Gradle test tasks default to four concurrent JVMs, with a Testcontainers override, private Liberty and Mule runtimes, and unique Ignite endpoints. The Synapse teardown race remains fixed, but the new serial debugging example can reuse a previous parallel result without running any tests.

Open Bits AI session

🤖 Bits Code Review · Commit 56a03dd

Comment thread docs/how_to_test.md Resolved
Comment thread gradle.properties Resolved
Comment thread .gitlab-ci.yml Resolved
Comment thread gradle.properties Resolved
Comment thread docs/how_to_test.md Resolved

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: FAIL

Gradle defaults to up to four JVMs per forked test task, with fixture isolation and Ryuk cleanup in GitLab CI. The Synapse teardown fix remains in place, and the serial comparison now forces execution with --rerun. The renamed Testcontainers settings silently ignore existing fork and task limits.

Open Bits AI session

🤖 Bits Code Review · Commit 4040b65

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-25 16:20:49 UTC ℹ️ Start processing command /merge


2026-11-25 16:20:54 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-25 17:11:45 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 28c6f40:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-25 17:45:56 UTC ℹ️ Start processing command /merge


2026-11-25 17:46:00 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-25 18:37:00 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 3424681 into master Nov 25, 2026
687 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/parallelize-forked-tests branch November 25, 2026 18:37
@github-actions github-actions Bot added this to the 1.70.0 milestone Nov 25, 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 tag: override groovy enforcement Override the "Enforce Groovy Migration" check type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants