ci(tests): shard the integration-test jobs into api / ui / samples slices - #6702
Merged
Conversation
…ices The full IT suite runs its 116 classes strictly sequentially, so each DB leg of build.yml/nightly.yml took 2h+ wall clock. Split every leg into three parallel matrix shards selected by JUnit 5 tag expressions: api -Dit.groups='!ui' (57 classes, ~48 min) ui -Dit.groups='ui & !sample & !camel' (34 classes, ~48 min) samples -Dit.groups='sample | camel' (25 classes, ~27 min) The run's wall clock becomes the slowest shard (~50 min) instead of the whole suite. The shards partition the suite - verified via JUnit Platform discovery: 57+34+25 = 116 classes, zero overlaps. New tags: @tag("sample") on the SampleProjectRepositoryIT base (inherited by all sample-project ITs) and @tag("camel") on each IT in ui/tests/camel (their PredefinedProjectIT base is shared with non-camel tests, so it cannot carry the tag). Shard timeouts drop from 150 to 90 minutes; failure screenshots are uploaded per shard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The full integration-test suite (116 IT classes, 275 test methods) runs strictly sequentially, so each DB leg of
build.yml/nightly.ymltakes 2h+ wall clock (e.g. run 31679871168: h2 leg 2h06m, postgresql leg 2h30m). The Maven build phase is only ~3 min — everything else is failsafe.Change
Split every DB leg into three parallel matrix shards selected by JUnit 5 tag expressions (the same mechanism the PR smoke job already uses):
api-Dit.groups='!ui'ui-Dit.groups='ui & !sample & !camel'samples-Dit.groups='sample | camel'The run's wall clock becomes the slowest shard (~50 min, meeting the ≤1h goal) instead of the whole suite, and a red shard immediately names the failing family. Total compute stays the same (+~3 min build phase per extra shard).
New tags:
@Tag("sample")on theSampleProjectRepositoryITbase — inherited by all 14 sample-project ITs.@Tag("camel")on each of the 11 ITs inui/tests/camel— theirPredefinedProjectITbase is shared with non-camel tests, so the base cannot carry the tag.Also: per-shard
timeout-minutes: 90(was 150), per-shard screenshot artifact names,fail-fast: falseso one red shard doesn't cancel the others, and doc updates (CLAUDE.md CI reference, tests-integrations pom comment).Verification
57 + 34 + 25 = 116classes — exactly the full-suite discovery count, with zero classes selected by more than one shard.mvn compile -pl tests/tests-integrationsandmvn formatter:validate -pl tests/tests-integrationsgreen; both workflow files YAML-validated.Follow-ups (separate PRs, discussed in the analysis)
@DirtiesContext(AFTER_EACH_TEST_METHOD)→AFTER_CLASSclass-by-class (275 → ~116 Spring boots, ~25–35 min/leg of compute;DatabaseFacadeITalready proves the pattern: 18 tests in 0.9 s).CreateNewFileITspends 431 s looping every file type through the UI).Note: the linked run's PG leg also failed functionally (
CsvProcessorIT,CsvimReimportIT—Table metadata was not found ... in schema [null], PostgreSQL-specific) — that is independent of this change and deserves its own issue.🤖 Generated with Claude Code