Sylwester Lachiewicz created FLINK-40511:
--------------------------------------------

             Summary: Track and speed up slow integration tests 
(KafkaSinkITCase and friends)
                 Key: FLINK-40511
                 URL: https://issues.apache.org/jira/browse/FLINK-40511
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / Kafka
            Reporter: Sylwester Lachiewicz


Background
CI runs under a 50-minute job budget, and the integration-test module dominates 
it. FLINK-40139 added a 15-minute per-method JUnit timeout as a safety net, but 
the underlying suite is genuinely slow. This issue tracks measuring and 
refactoring the slow ITCases so the whole module fits the budget with room to 
spare.

Measurements (JDK 21, surefire per-method XML; CI matches local within ~2%)
| Class | Methods | Total |
|---|---|---|
| KafkaSinkITCase | 117 | ~712s |
| KafkaTableITCase | | ~116s |
| DynamicKafkaSourceITTest | | ~111s |
| all other classes | | <120s each |

KafkaSinkITCase is the outlier. Its slowest single methods are the exactly-once 
recovery variants (~30–34s each: testRecoveryWithExactlyOnceGuarantee1 at 
33.7s, siblings at 32.6/32.5/31.7s, rescaleListing6 at 19.0s) — likely bounded 
by checkpoint intervals rather than test logic.

Directions to evaluate
* Split KafkaSinkITCase by feature (exactly-once recovery, rescaling, delivery 
guarantees) into smaller classes.
* Reduce per-test broker/container setup cost: KafkaTestBase is all-static with 
per-class prepare/shutDownServices across 12 test classes; sharing environments 
across classes requires config-keyed shared environments (cluster count, secure 
mode) with JVM-shutdown-hook cleanup — beware cross-class group.id/offset 
leakage.
* surefire forkCount > 1 to parallelize at class level (experimented with on 
branch ci-surefire-forkcount-2).

Not a blocker for FLINK-40139; the 15m default timeout already bounds the worst 
case per method.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to