-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
org.testcontainers.kafka.KafkaContainer is not reusable #9143
Copy link
Copy link
Closed
Labels
Description
Discussed in #9119
Originally posted by cer August 17, 2024
I discovered that kafka.KafkaContainer is not reusable.
As far as I can tell, it's because of the configure() method:
testcontainers-java/modules/kafka/src/main/java/org/testcontainers/kafka/KafkaContainer.java
Line 70 in cb7a793
| withEnv("KAFKA_CONTROLLER_QUORUM_VOTERS", controllerQuorumVoters); |
The value of KAFKA_CONTROLLER_QUORUM_VOTERS uses the random network alias generated by GenericContainer's constructor.
Is there a reason why it doesn't simply use localhost?
Thoughts?
Reactions are currently unavailable