subhramit opened a new pull request, #17770: URL: https://github.com/apache/iceberg/pull/17770
Partially addresses https://github.com/apache/iceberg/issues/12937. Exclude `junit` and `org.junit.vintage` from the `connector.test.utils` and `test.utils` test dependencies in all three Flink modules (`v1.20`, `v2.0`, `v2.1`), and remove the now-redundant explicit `flink-test-utils-junit` dependency and its `libs.versions.toml` aliases. Keep `junit:junit` as an explicit runtime-only dependency for Flink tests and integration tests in those modules as a temporary workaround for Flink's own transitive test infrastructure. Full removal of JUnit 4 from the Flink test runtime remains blocked upstream by [FLINK-25325](https://issues.apache.org/jira/browse/FLINK-25325). Although the Iceberg Flink tests in this branch already use JUnit 5 extensions (for example, `TestIcebergSourceFailover` uses `MiniClusterExtension`, not `MiniClusterWithClientResource`), Flink's transitive `flink-test-utils-junit` implementation still requires JUnit 4 classes at runtime. ### Testing Verified via repo search that no Iceberg Flink test class under `flink/` references `MiniClusterWithClientResource`, `org.junit.rules`, `@Rule`, or `ExternalResource`. Also ran: ```bash ./gradlew :iceberg-flink:iceberg-flink-2.0:dependencies --configuration testRuntimeClasspath | grep -i junit +--- org.junit.jupiter:junit-jupiter:5.14.4 | +--- org.junit:junit-bom:5.14.4 | | +--- org.junit.jupiter:junit-jupiter:5.14.4 (c) | | +--- org.junit.jupiter:junit-jupiter-api:5.14.4 (c) | | +--- org.junit.jupiter:junit-jupiter-engine:5.14.4 (c) | | +--- org.junit.jupiter:junit-jupiter-params:5.14.4 (c) | | +--- org.junit.platform:junit-platform-engine:1.14.4 (c) | | +--- org.junit.platform:junit-platform-launcher:1.14.4 (c) | | \--- org.junit.platform:junit-platform-commons:1.14.4 (c) | +--- org.junit.jupiter:junit-jupiter-api:5.14.4 | | +--- org.junit:junit-bom:5.14.4 (*) | | \--- org.junit.platform:junit-platform-commons:1.14.4 | | \--- org.junit:junit-bom:5.14.4 (*) | +--- org.junit.jupiter:junit-jupiter-params:5.14.4 | | +--- org.junit:junit-bom:5.14.4 (*) | | \--- org.junit.jupiter:junit-jupiter-api:5.14.4 (*) | \--- org.junit.jupiter:junit-jupiter-engine:5.14.4 | +--- org.junit:junit-bom:5.14.4 (*) | +--- org.junit.platform:junit-platform-engine:1.14.4 | | +--- org.junit:junit-bom:5.14.4 (*) | | \--- org.junit.platform:junit-platform-commons:1.14.4 (*) | \--- org.junit.jupiter:junit-jupiter-api:5.14.4 (*) +--- org.junit.jupiter:junit-jupiter-engine:5.14.4 (*) +--- org.junit.platform:junit-platform-launcher:1.14.4 | +--- org.junit:junit-bom:5.14.4 (*) | \--- org.junit.platform:junit-platform-engine:1.14.4 (*) | | +--- org.apache.flink:flink-test-utils-junit:2.0.0 | | | +--- org.junit.jupiter:junit-jupiter:5.11.4 -> 5.14.4 (*) | | +--- org.junit.jupiter:junit-jupiter:5.11.4 -> 5.14.4 (*) | | | \--- org.junit.jupiter:junit-jupiter-api:5.6.2 -> 5.14.4 (*) | +--- org.apache.flink:flink-test-utils-junit:2.0.0 (*) | +--- org.junit.jupiter:junit-jupiter:5.11.4 -> 5.14.4 (*) \--- junit:junit:4.13.2 ``` to confirm `junit-vintage-engine` and `org.junit.vintage` no longer resolve. `junit:junit:4.13.2` still resolves intentionally as an explicit runtime-only workaround. Ran focused tests: ```bash ./gradlew -DflinkVersions=1.20 :iceberg-flink:iceberg-flink-1.20:test --tests org.apache.iceberg.flink.TestFlinkConfParser ./gradlew -DflinkVersions=2.0 :iceberg-flink:iceberg-flink-2.0:test --tests org.apache.iceberg.flink.TestFlinkConfParser ./gradlew -DflinkVersions=2.1 :iceberg-flink:iceberg-flink-2.1:test --tests org.apache.iceberg.flink.TestFlinkConfParser ./gradlew spotlessCheck ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
