Skip to content

Flink: Remove JUnit4 dependency from Flink modules#15815

Open
sachinnn99 wants to merge 1 commit intoapache:mainfrom
sachinnn99:flink-remove-junit4-dep
Open

Flink: Remove JUnit4 dependency from Flink modules#15815
sachinnn99 wants to merge 1 commit intoapache:mainfrom
sachinnn99:flink-remove-junit4-dep

Conversation

@sachinnn99
Copy link
Copy Markdown

@sachinnn99 sachinnn99 commented Mar 28, 2026

What

Remove the explicit flink-test-utils-junit dependency from all three Flink version modules (v1.20, v2.0, v2.1) and clean up the corresponding library aliases from libs.versions.toml.

Why

All Flink test code has already been migrated to JUnit5 in prior work (#13021, #10770), making the explicit flink-test-utils-junit dependency vestigial. The artifact remains available transitively through flink-test-utils and flink-connector-test-utils.

Changes

  • flink/v1.20/build.gradle, flink/v2.0/build.gradle, flink/v2.1/build.gradle: Removed explicit flink-test-utils-junit dependency
  • gradle/libs.versions.toml: Removed 3 unused flink-test-utils-junit library aliases

Note

This does not fully resolve #12937. JUnit4 (junit:junit) still reaches the test classpath transitively through flink-connector-test-utils and flink-test-utils, because Flink's internal test utilities still reference org.junit.rules.ExternalResource at runtime. Fully removing JUnit4 requires upstream changes in Flink first.

Remove the explicit flink-test-utils-junit dependency from all three
Flink version modules (v1.20, v2.0, v2.1). All Flink test code has
already been migrated to JUnit5 in prior work, making this dependency
vestigial. The artifact remains available transitively through
flink-test-utils and flink-connector-test-utils.

Also removes the corresponding library aliases from libs.versions.toml.

Fixes apache#12937
@sachinnn99 sachinnn99 force-pushed the flink-remove-junit4-dep branch from 8fef98b to a4f3b1c Compare March 28, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove JUnit4 dependency from Flink

1 participant