Repository navigation
Conversation
This was referenced Oct 21, 2026
Open
Open
[#14049] improvement(test): Replace the remaining container CLI calls with in-process clients
#14076
Draft
Open
Open
Open
Draft
Draft
Draft
Draft
nevzheng
force-pushed
the
claude/13900-tc-00a0-junit4-assertions
branch
from
October 21, 2026 21:18
5caee46 to
426f743
Compare
nevzheng
force-pushed
the
claude/13900-tc-00a0-junit4-assertions
branch
from
October 21, 2026 21:37
426f743 to
3cbcdb6
Compare
nevzheng
marked this pull request as ready for review
October 21, 2026 22:16
nevzheng
force-pushed
the
claude/13900-tc-00a0-junit4-assertions
branch
from
October 21, 2026 22:27
3cbcdb6 to
8467d9a
Compare
nevzheng
force-pushed
the
claude/13900-tc-00a0-junit4-assertions
branch
2 times, most recently
from
October 22, 2026 03:28
2200e84 to
91464d8
Compare
…st libraries each module uses
nevzheng
force-pushed
the
claude/13900-tc-00a0-junit4-assertions
branch
from
October 22, 2026 04:29
91464d8 to
b95f0d8
Compare
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.
What changes were proposed in this pull request?
The last JUnit 4 code in Gravitino's tests becomes JUnit Jupiter, every module declares the test libraries it uses, and a checkstyle rule keeps JUnit 4 out.
org.junit.Asserttoorg.junit.jupiter.api.Assertions; 123 calls move the failure message from the first argument to the last, where Jupiter takes it.TestOwnerDetails(clients/cli): the module has no vintage engine, so the JUnit Platform skipped it silently; its 2 tests now run, and pass.TestGravitinoCatalogStore(flink-common): it already ran through the vintage engineflink-test-utilsbrings; its 8 tests now run on Jupiter.mockito-core,assertj-core,junit-jupiter-api,junit-platform-commons/-engine,testcontainers-jdbcandcommons-lang3, with new catalog entries for AssertJ andtestcontainers-jdbc. Resolved test classpaths are unchanged.org.junit.platform.commons.util.StringUtils; they use commons-lang3.TestParseTypedrops Hamcrest forassertInstanceOf.TestChainedAuthorizationITmeant to replace 12 ofRangerBaseE2EIT's tests with stubs, but the base methods were package-private in another package, so the stubs were new methods, not overrides. JUnit 5.8.1 hid that; JUnit 5.11+ runs both (its release notes call this out), and the Ranger tests then fail under the chained setup. The base methods becomeprotectedand the stubs@Override, so the compiler now catches a mismatch.IllegalImportbansorg.junit.*outsidejupiterandplatform, static imports included. It is the only checkstyle rule; Spotless still owns formatting.How to review. By pattern, not by file:
org.junit.Assert.X→org.junit.jupiter.api.Assertions.X, same method.assertTrue("msg", cond)→assertTrue(cond, "msg").@Before/@After/@Test→ Jupiter, in the two classes only.StringUtils: JUnit's internal copy → commons-lang3, same methods.Cross-checked against OpenRewrite's
JUnit4to5Migrationfor the assertion files: the same result in 42 of 44 files. InTestTagCommandsthe recipe's output does not compile; inTestOwnerDetailsthis PR usesassertThrowsinstead of try/fail/catch.Why are the changes needed?
TestOwnerDetailslooked like a test and never ran.junit:junitand other libraries brought Mockito, AssertJ or JUnit APIs. Testcontainers 2 ([#13958] improvement(build): Upgrade Testcontainers to 2.0.5 #14084) dropsjunit:junit; declaring what each module uses keeps its tests compiling when dependencies shift.junit:junitand not running.Part of #14105
Does this PR introduce any user-facing change?
No. Test code and test dependencies only.
How was this patch tested?
-Werrorin every project; re-addingimport org.junit.Testfails checkstyle with "Illegal import".build (17)job: onmain,:clients:cli:test --tests '*TestOwnerDetails*'finds no tests; here it runs 2.Stack: #14103 → #14083 → #14084 → #14085 → #14005 → #14006 → #14052 → #14076 → #14007 → #14008 → #14009 → #14010 → #14011 → #14012 → #14013 → #14079 → #14077 → #14078 → #14086 → #14087 → #14088 → #14089 → #14090 → #14091 → #14094