test(processing): stabilize flaky IndexIOTest execution - #19859
Open
FrankChen021 wants to merge 3 commits into
Open
test(processing): stabilize flaky IndexIOTest execution#19859FrankChen021 wants to merge 3 commits into
FrankChen021 wants to merge 3 commits into
Conversation
FrankChen021
marked this pull request as ready for review
August 3, 2026 12:29
FrankChen021
marked this pull request as draft
August 3, 2026 12:31
FrankChen021
marked this pull request as ready for review
August 3, 2026 12:33
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Refactors IndexIOTest to avoid Surefire/JUnit 5 parameterized-class testset explosion that can overwhelm fork communication, while preserving the full parameter stream and assertions.
Changes:
- Convert
IndexIOTestfrom@ParameterizedClassto a single@ParameterizedTestdriven by the same@MethodSource. - Create fresh
IncrementalIndexinstances per parameterized invocation to avoid cross-case coupling. - Configure Surefire to emit phrased parameterized testcase names in XML output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| processing/src/test/java/org/apache/druid/segment/IndexIOTest.java | Moves from class-level to method-level parameterization and makes index construction per-invocation. |
| pom.xml | Enables JUnit 5 XML 3.0 stateless reporter with phrased testcase names for parameterized tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
IndexIOTestused JUnit 5@ParameterizedClass, which caused each of its 5,925 method-source tuples to be reported as a separate Surefire test set. The resulting stream ofRunningandTests run: 1events can overwhelm the Surefire fork communication channel; the failing master run timed out after 60 minutes while the fork was blocked in that channel.This patch:
IndexIOTestto one@ParameterizedTestwhile preserving all generated cases and assertions;The change does not alter Druid runtime behavior or reduce test coverage.
CI findings
The failure on the latest
masterpush was a CI execution flake, not a failing assertion in the commit's changed test. The push commit only changedIncrementalIndexCursorFactoryTest; the failing job was the JDK 25I*,A*,U*shard runningIndexIOTestas part of the unit-test matrix.Running org.apache.druid.segment.IndexIOTestandTests run: 1without an assertion failure.Channels$1.writewhile completing a test set; Maven's parent process was waiting for the fork. This indicates Surefire event-channel backpressure from the per-parameter test-set reporting.IndexIOTestis a functional correctness test, not a benchmark. It generates 5,925 combinations of input maps and expected validation outcomes. The refactor keeps those cases and assertions intact while reducing the number of Surefire test sets from one per combination to one parameterized test method. The standard Surefire XML report still records the individual invocations without adding custom name formatting.Performance comparison
Measured locally on the same checkout with JDK 25 and the same Maven command:
@ParameterizedClassbaseline@ParameterizedTestThe method-level parameterization reduced the local Surefire test phase by roughly 53x. The report contains all 5,925 testcase entries using the standard Surefire naming.
Verification
IndexIOTestparameter stream: 5,925 passed.git diff --check.master.Key changed/added classes in this PR
processing/src/test/java/org/apache/druid/segment/IndexIOTest.javaThis PR has: