FrankChen021 opened a new pull request, #19859:
URL: https://github.com/apache/druid/pull/19859
### Description
`IndexIOTest` used 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 of `Running` and `Tests run: 1` events 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:
- converts `IndexIOTest` to one `@ParameterizedTest` while preserving all
generated cases and assertions;
- creates fresh incremental indexes for each invocation; and
- enables phrased parameterized testcase names in Surefire XML reports, for
example `...[1] schema=[{}], rows=[{}], dimensions=null`.
The change does not alter Druid runtime behavior or reduce test coverage.
### Performance comparison
Measured locally on the same checkout with JDK 25 and the same Maven command:
```text
mvn -B -pl processing -Dtest=IndexIOTest \
-Dsurefire.failIfNoSpecifiedTests=false \
-Dweb.console.skip=true -P skip-static-checks test
```
| Configuration | Tests | Surefire test time | Wall-clock time |
| --- | ---: | ---: | ---: |
| `@ParameterizedClass` baseline | 5,925 passed | 189.5 s | 3:31.95 |
| `@ParameterizedTest` + phrased XML reporting | 5,925 passed | 3.459 s |
22.633 s |
The method-level parameterization reduced the local Surefire test phase by
roughly 55x. Enabling phrased XML reporting added no material runtime cost; the
report contains all 5,925 named testcase entries and is approximately 2 MB.
### Verification
- Ran the complete `IndexIOTest` parameter stream: 5,925 passed.
- Confirmed the Surefire XML report contains 5,925 testcase entries with the
parameterized display names.
- Ran `git diff --check`.
- Self-reviewed the complete diff against `master`.
<hr>
##### Key changed/added classes in this PR
* `processing/src/test/java/org/apache/druid/segment/IndexIOTest.java`
* Surefire configuration in `pom.xml`
<hr>
This PR has:
- [x] been self-reviewed.
- [x] added or modified existing unit tests to preserve coverage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]