Lewis John McGibbney created NUTCH-3145:
-------------------------------------------
Summary: Upgrade to JUnit 6
Key: NUTCH-3145
URL: https://issues.apache.org/jira/browse/NUTCH-3145
Project: Nutch
Issue Type: Improvement
Components: test
Reporter: Lewis John McGibbney
Fix For: 1.22
JUnit 6 was released on September 30, 2025 (with the latest patch 6.0.2 on
January 6, 2026). It builds directly on JUnit 5's Jupiter model, so core
annotations, extensions, and test-writing philosophy remain largely unchanged.
The transition should be MUCH smoother than from JUnit 4 to 5 (NUTCH-2887).
{{h3. Key Differences: JUnit 5 vs JUnit 6
| Aspect | JUnit 5 | JUnit 6 |
|--------|---------|---------|
| *Latest Stable Version* | 5.14.x series | 6.0.2 (released January 6, 2026) |
| *Minimum Java Version* | Java 8 | Java 17 |
| *Minimum Kotlin Version* | Lower versions supported | Kotlin 2.2+ |
| *Versioning Scheme* | Platform had separate versioning (e.g., 1.x); Jupiter
and Vintage shared 5.x | Unified single version across Platform, Jupiter, and
Vintage (e.g., all 6.0.2) |
| *Vintage Engine (JUnit 3/4 support)* | Fully supported | Deprecated (with
INFO-level warnings during discovery); intended only for temporary migration |
| *Removed Modules* | Included junit-platform-runner and junit-platform-jfr |
Both modules removed |
| *CSV Parsing (@CsvSource, @CsvFileSource)* | Used univocity-parsers |
Migrated to FastCSV (faster, better error handling, RFC-compliant; minor
behavior differences for malformed input) |
| *Kotlin Support* | Limited coroutine integration | Native support for suspend
modifier on test and lifecycle methods |
| *Nullability Annotations* | No built-in support | Integrates JSpecify
(@Nullable, @NonNull) for improved static analysis |
| *Other Notable Changes* | - | Deterministic (but non-obvious) ordering of
@Nested classes<br>Cancellation/fail-fast support improvements<br>Removal of
many deprecated APIs<br>Built-in enhancements for performance and modern JDK
compatibility |
| *Migration Effort* | - | Generally low for pure Jupiter tests; main impacts
are Java version upgrade and Vintage deprecation. See official migration guide:
https://github.com/junit-team/junit-framework/wiki/Upgrading-to-JUnit-6.0 |
JUnit 6 is an evolutionary update focused on modernization, cleanup, and
dropping legacy support. Most existing Jupiter tests run unchanged.}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)