You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Savonitar (via GitHub)" <gi...@apache.org> on 2026/02/03 10:10:08 UTC
Re: [PR] [hotfix] Fix kafka connection flakeyness in tests [flink-connector-kafka]
Savonitar commented on code in PR #219:
URL: https://github.com/apache/flink-connector-kafka/pull/219#discussion_r2758284565
##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/testutils/TestKafkaContainer.java:
##########
@@ -77,7 +80,8 @@ public TestKafkaContainer(DockerImageName dockerImageName) {
.withEnv(
"KAFKA_LISTENER_SECURITY_PROTOCOL_MAP",
"PLAINTEXT:PLAINTEXT,BROKER:PLAINTEXT,CONTROLLER:PLAINTEXT")
- .withEnv("KAFKA_INTER_BROKER_LISTENER_NAME", "BROKER");
+ .withEnv("KAFKA_INTER_BROKER_LISTENER_NAME", "BROKER")
+ .waitingFor(Wait.forSuccessfulCommand(CONTAINER_STARTUP_CHECK).withStartupTimeout(CONTAINER_STARTUP_TIMEOUT));
Review Comment:
Doesn't `ConfluentKafkaContainer` already have a wait strategy inside?
in org.testcontainers.kafka.ConfluentKafkaContainer#ConfluentKafkaContainer(org.testcontainers.utility.DockerImageName)
```
this.waitingFor(KafkaHelper.WAIT_STRATEGY);
```
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org