spuru9 opened a new pull request, #30179:
URL: https://github.com/apache/flink/pull/30179
## What is the purpose of the change
`BanJunit4Rules` is only used by flink-table-planner, and it misses JUnit 4
that a test gets from a base class such as `TestLogger`, as well as the
`org.junit.rules`, `org.junit.runners` and `junit.framework` packages. This
extends the rule and applies it to every module with a
`TestCodeArchitectureTest`, so JUnit 4 can't come back there.
## Brief change log
- Remove the last JUnit 4 usages in these modules: leftover `extends
TestLogger` in four JUnit 5 tests, `assertThrows` in
`RegistryAvroFormatFactoryTest`, and `AvroOutputFormatITCase` moves to
`JavaProgramTestBase`.
- `BanJunit4Rules` matches all JUnit 4 packages and flags subclasses of
classes that depend on JUnit 4. The rule description is unchanged.
- Apply the rule to the 22 other modules with generated stores. They are
empty except for `SourceReaderBaseTest` in flink-connector-base, whose base
class `SourceReaderTestBase` is switched to `TestLoggerExtension` in
FLINK-41705.
## Verifying this change
`TestCodeArchitectureTest` passes in all 23 modules. Without the fixes in
the first commit, the extended rule fails in flink-table-planner with three
violations, while the old rule passes. The changed tests run the same test
methods as before.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Claude Opus 5.5)
--
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]