File tree 1 file changed +4
-5
lines changed
modules/kafka/src/main/java/org/testcontainers/containers
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -182,15 +182,14 @@ protected void containerIsStarting(InspectContainerResponse containerInfo) {
182
182
// exporting KAFKA_ADVERTISED_LISTENERS with the container hostname
183
183
command += String .format ("export KAFKA_ADVERTISED_LISTENERS=%s\n " , kafkaAdvertisedListeners );
184
184
185
- if (this .kraftEnabled && isLessThanCP740 ()) {
185
+ if (! this .kraftEnabled || isLessThanCP740 ()) {
186
186
// Optimization: skip the checks
187
187
command += "echo '' > /etc/confluent/docker/ensure \n " ;
188
- command += commandKraft ();
189
188
}
190
189
191
- if (! this .kraftEnabled ) {
192
- // Optimization: skip the checks
193
- command += "echo '' > /etc/confluent/docker/ensure \n " ;
190
+ if (this .kraftEnabled ) {
191
+ command += commandKraft ();
192
+ } else if ( this . externalZookeeperConnect == null ) {
194
193
command += commandZookeeper ();
195
194
}
196
195
You can’t perform that action at this time.
0 commit comments