GH-3618: Migrate multiple modules to JUnit5#3673
Open
nastra wants to merge 1 commit into
Open
Conversation
nastra
commented
Jul 17, 2026
| import org.junit.jupiter.api.Test; | ||
| import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport; | ||
|
|
||
| @EnableRuleMigrationSupport |
Contributor
Author
There was a problem hiding this comment.
these JUnit benchmarks depend on com.carrotsearch.junitbenchmarks.BenchmarkRule which is only available for JUnit4, so we can't really convert that Rule to JUnit5. We're making sure that this uses JUnit5 imports but runs with the migration module, which supports JUnit4 rule execution
nastra
commented
Jul 17, 2026
| import org.junit.jupiter.params.ParameterizedTest; | ||
| import org.junit.jupiter.params.provider.ValueSource; | ||
|
|
||
| @RunWith(Parameterized.class) |
Contributor
Author
There was a problem hiding this comment.
JUnit5 doesn't have class-level parameterization unfortunately, so everything is parameterized at the method level
nastra
marked this pull request as draft
July 17, 2026 07:36
nastra
commented
Jul 17, 2026
| public Integer offset; | ||
|
|
||
| @Parameters | ||
| public static List<Object[]> parameters() { |
Contributor
Author
There was a problem hiding this comment.
this refactors the test slightly to have nested test classes that use their own parameters
nastra
marked this pull request as ready for review
July 17, 2026 07:42
Contributor
Author
wgtmac
approved these changes
Jul 17, 2026
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.
Rationale for this change
Now that these modules have been migrated to AssertJ assertions, migrating them to JUnit5 is trivial and mostly requires import changes.
While this touches 180+ files, there are actually < 10 files that have substantial changes (mostly around parameterized testing). All the other files have pure import changes. JUnit5 doesn't support built-in class-level test parameterization and so those tests were converted to parameterize at the method level.
I'll have a second PR that will migrate parquet-hadoop to JUnit5 because that requires few more substantial changes
What changes are included in this PR?
Are these changes tested?
yes
Are there any user-facing changes?
no