Skip to content

Commit e26788a

Browse files
committed
[hotfix] always obtain port in Kafka
1 parent 3142e58 commit e26788a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/kafka/src/main/java/org/testcontainers/containers/KafkaContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ protected void doStart() {
8383
protected void containerIsStarting(InspectContainerResponse containerInfo, boolean reused) {
8484
super.containerIsStarting(containerInfo, reused);
8585

86+
port = getMappedPort(KAFKA_PORT);
87+
8688
if (reused) {
8789
return;
8890
}
8991

90-
port = getMappedPort(KAFKA_PORT);
91-
9292
final String zookeeperConnect;
9393
if (externalZookeeperConnect != null) {
9494
zookeeperConnect = externalZookeeperConnect;

0 commit comments

Comments
 (0)