FrankChen021 opened a new pull request, #19940:
URL: https://github.com/apache/druid/pull/19940
### Description
This PR migrates processing test Batch 1 to JUnit 5 following
`dev/junit5-migration-guidance.md`.
#### Migrate processing tests
- Convert the Batch 1 processing tests to JUnit 5 lifecycle, assertions, and
extensions.
- Replace direct uses of the redundant assertion and exception-wrapper
helpers with JUnit Jupiter APIs.
- Rename `TempDirExtension` to `TemporaryFolderExtension` and retain a
compatibility bridge for remaining JUnit 4 temporary-folder callers.
#### Add and document JUnit 5 helpers
- Add `TemporaryFolderExtension` for Druid-managed temporary directories.
- Add `LoggerCaptureExtension` for capturing Log4j events in JUnit 5 tests.
- Retain `ExpectThrows` for existing annotation-style tests while preferring
`Assertions.assertThrows(...)` for new tests.
- Document the helper APIs and their intended usage in `AGENTS.md`.
The temporary-folder compatibility bridge is intentionally limited to
existing mixed JUnit 4/JUnit 5 fixture consumers and can be removed after those
callers are migrated.
#### Release note
No user-facing behavior change.
##### Key changed/added classes in this PR
* `TemporaryFolderExtension`
* `LoggerCaptureExtension`
* `ExpectThrows`
* `NestedDataTestUtils`
This PR has:
- [x] been self-reviewed.
- [x] added documentation for new or modified test helpers.
- [x] added Javadocs for the new helper classes and compatibility bridge.
- [x] added comments explaining the intent of the compatibility bridge.
- [x] added or updated unit tests through the JUnit 5 migration.
Validation:
- `mvn -ntp -pl processing test-compile -Dweb.console.skip=true -T1C`
- Focused processing tests covering the migrated assertion and
temporary-folder helpers: 122 tests passed.
- `git diff --check`
--
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]