Skip to content

[Subtask] Upgrade the test toolchain: remove JUnit 4, JUnit 6, Testcontainers 2 #14105

Open

Description

@nevzheng

Describe the subtask

Move the test toolchain to the versions the container framework (#14002) builds on. Each PR merges on main on its own:

  1. Remove JUnit 4 and declare what tests use. Each module declares the test libraries it imports instead of getting them transitively, and a checkstyle IllegalImport rule bans org.junit.* outside jupiter and platform. 42 test files still use org.junit.Assert, and two JUnit 4 test classes remain: TestOwnerDetails (clients/cli) never ran, since that module has no vintage engine; TestGravitinoCatalogStore ran through the vintage engine flink-test-utils brings. They compile only because Testcontainers 1.x puts junit:junit on the test classpath.
  2. JUnit 5.8.1 → 6.1.3, with junit-platform-launcher on the test runtime and the two extension API changes JUnit 6 needs.
  3. BackendTestExtension on JUnit's store cleanup, so it and the fixtures of [Subtask] Add a JUnit fixture framework for test containers and move every caller to it #14002 close resources the same way.

Testcontainers 1.21.4 → 2.0.5 is #13958 and lands between 2 and 3; 2.x drops junit:junit, which is why 1 comes first.

Parent issue

#13900

Order and PRs

#14103 (JUnit 4 removal) → #14083 (JUnit 6) → #14084 (Testcontainers 2, closes #13958) → #14085 (BackendTestExtension, closes this issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

subtaskSubtasks of umbrella issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions