Shard CI tests and raise the surefire fork count - #3079
Open
cgivre wants to merge 1 commit into
Open
Conversation
The unit test suite dominates CI wall clock, and exec/java-exec alone accounts for roughly half of it. Split each matrix entry three ways by test class name and run two surefire forks per job. The shard patterns are exhaustive over every test class in the repo, so a newly added test always lands in a shard instead of being silently skipped.
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.
Description
The unit test suite dominates CI wall clock time, and
exec/java-execalone accounts for roughly half of it (~31 minutes across 577 classes).This splits each matrix entry three ways by test class name and runs two surefire forks per job:
Select test shardstep mapsmatrix.shardto a-Dtest=...pattern list. Boundaries were picked from measured per-class times; the longest shard is about 11 minutes.-DforkCount=2— several of the slowest classes are wall-clock bound rather than CPU bound (TestTimedCallablesleeps for 105 seconds; the RPC, SSL and graceful-shutdown tests wait on timeouts), so a second fork overlaps that idle time cheaply. Raising it further needs memory headroom — the vector tests fail withOutOfMemoryExceptionunder pressure.Two things worth calling out in review:
-Dtest='Test[A-F]*'silently matches nothing and the build passes green having run no tests, so only*wildcards and comma separated lists are used.*Test,*Tests,*TestCase) to pick up classes not namedTest*.TestFrameworkTestmatches shards 1 and 3 and runs twice — harmless, and far safer than a gap.-Dsurefire.failIfNoSpecifiedTests=falseis needed because most modules match no pattern in a given shard.Documentation
N/A — CI configuration only.
Testing
CI on this PR is the test: all nine jobs (3 Java versions x 3 shards) must pass, and between them they run the same set of test classes as the previous single job.