test(processing): migrate segment tests to JUnit 5 - #19981
Conversation
|
Addressed the CodeQL array-bound finding in the current Batch 3 branch (head 98eab35): split the null and non-null loops so each array access is statically bounded by the corresponding array length. The focused FixedIndexedTest cases pass. The current token cannot execute GitHub inline review replies or resolveReviewThread, so this top-level response records the fix. |
|
The targeted retry (workflow attempt 2) reproduced the same unrelated environment failure: SchemalessTestSimpleTest intermittently failed testFullOnTimeseries/testFullOnSearch, then the Zulu OpenJDK 25.0.4 VM terminated with SIGSEGV (exit 134). The migration change is not on this stack; I will make one further targeted retry after GitHub finalizes the run. |
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
Reviewed 56 of 56 changed files.
This is an automated review by Codex GPT-5.6-Luna(max)
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 55 of 55 changed files.
This is an automated review by Codex GPT-5.6-Luna(max)
Fixes #13948.
Description
Migrate Batch 3 processing tests to the current JUnit 5 APIs while preserving test behavior and compatibility. This covers segment core, serialization, incremental indexes, and the index-merger hierarchy.
The migration uses
TemporaryFolderExtension,CloserExtension, andLoggerCaptureExtension, retains the existingCloserRulecompatibility test, and preserves the sharedDruidExceptionMatcherandExceptionMatcherAPIs.Scope
processing/src/test/java/org/apache/druid/segmentcore and index-merger testssegment/column,segment/data,segment/generator,segment/incremental,segment/serde,segment/shim,segment/transform,segment/vector, andsegment/writeoutCloserRule.java, orprocessing/pom.xmlchangesValidation
mvn -ntp -pl processing -am test-compile -Dweb.console.skip=true -T1C— passed with Checkstyle, PMD, forbidden APIs, enforcer, and compilation checksmvn -ntp -pl processing spotbugs:check -Dweb.console.skip=true— passed with 0 bugs and 0 errors (SpotBugs reported one missing optionalMarkerManagerclass during analysis)git diff --checkand scope audits — passedThe broader parameterized Schemaless run was not stable on the local OpenJDK 25 environment: it reproduced intermittent direct-buffer
UnsafeSIGSEGVs and two parameterized-instance flakes that also occurred when the class was run in isolation. No source assertion failure was isolated.Key changed/added classes in this PR
CloserRuleTestcompatibility coverageThis PR has: