This is an automated email from the ASF dual-hosted git repository.
roman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-kafka.git
The following commit(s) were added to refs/heads/main by this push:
new d6785701 [FLINK-39121][tests] Retry kafka containers startup
d6785701 is described below
commit d67857014bc288a03849dc2cc9989c57bd6a2ec1
Author: Efrat Levitan <[email protected]>
AuthorDate: Sun Feb 22 12:17:14 2026 +0200
[FLINK-39121][tests] Retry kafka containers startup
I observed CI flakiness around Confluent container startup, sourced to race
condition in testcintainers kafka container configuration:
ConfluentKafkaContainer
[configured](https://github.com/testcontainers/testcontainers-java/blob/dea972503664ebfed2b74957c740e58bd93d579f/modules/kafka/src/main/java/org/testcontainers/kafka/KafkaHelper.java\#L28-L31)
command waits for the starter script to be mounted and 0.1 second later tries
to execute it, soemtimes resulting in a ContainerLaunchExc [...]
While there isn't much we can / want to interfere with the predefined
configurations, retrying the startup will decrease the effect of this race
condition on CI failures rate.
---
.../org/apache/flink/connector/kafka/testutils/TestKafkaContainer.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/testutils/TestKafkaContainer.java
b/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/testutils/TestKafkaContainer.java
index 53d60a1f..ce12a436 100644
---
a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/testutils/TestKafkaContainer.java
+++
b/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/testutils/TestKafkaContainer.java
@@ -124,6 +124,7 @@ public class TestKafkaContainer implements AutoCloseable,
Startable {
.withEnv(
"KAFKA_TRANSACTION_MAX_TIMEOUT_MS",
String.valueOf(Duration.ofHours(2).toMillis()));
+ delegate.withStartupAttempts(3);
}
/**