MartijnVisser opened a new pull request, #303: URL: https://github.com/apache/flink-connector-kafka/pull/303
Manual backport of the `KafkaWriterFaultToleranceITCase` part of FLINK-39699 (PR #254) and the FLINK-37611 assertion loosening to `v3.4`. ## Why The weekly connector CI on `v3.4` (Flink 1.20.x) failed on `KafkaWriterFaultToleranceITCase.testCloseExceptionWhenKafkaUnavailable` on 2026-09-06 with "Expecting actual not to be null". The `main` fix (`887d5941`) does not cherry-pick because the `v3.4` test still uses `createWriterWithConfiguration(...)` and `hasRootCauseExactlyInstanceOf(NetworkException.class)`. ## What One commit, ported by hand: - The warm-up `write` and `flush` before `KAFKA_CONTAINER.stop()` plus a second `write` after the stop in the three `...WhenKafkaUnavailable` tests, as in `887d5941`. - The assertion change from FLINK-37611 (`d74a7bd8`, `2b199b0c`): `.rootCause().isInstanceOfAny(NetworkException.class, TimeoutException.class)`. Without it a `TimeoutException` after the broker stop would only move the flake. `KafkaSinkITCase` on `v3.4` is the older class without `rescaleListing`, so the other FLINK-39699 commits have nothing to port. ## Verification - `mvn -pl flink-connector-kafka spotless:check test-compile` passes on `v3.4`. - `KafkaWriterFaultToleranceITCase` passes locally (4/4) on `v3.4` with Flink 1.20.0, five consecutive runs green. ## Brief change log - Test-only change, no production code touched. ## 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: 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 ## AI disclosure - [x] This pull request was created with the help of an AI tool (Claude Code). The port was reviewed and verified locally by the author. -- 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]
