manub / scalatest-embedded-kafka

A library that provides an in-memory Kafka instance to run your tests against.
MIT License
295 stars 87 forks source link

EmbeddedKafka.start(cfg) where zookeeper and kafka ports are determined #143

Closed crankydillo closed 6 years ago

crankydillo commented 6 years ago

Hi,

I would like to use the manual start/stop methods of EmbeddedKafka along with having zookeeper and kafka ports determined by this library. It seems like a trivial change made here involving reading the zookeeper port from the factory variable is all that's needed. I don't mind creating a PR if you're OK with this change.

manub commented 6 years ago

Feel free to do so, keep in mind that ideally the old behaviour should be unchanged and the new behaviour should be happening only when calling the "new" way.

crankydillo commented 6 years ago

Thanks. I was thinking the existing behavior would be changed though. Is there ever a case, where we wouldn't want the port used by the zookeeper instance (created here) to be passed via EmbeddedKafkaConfiguration here? In other words, I consider the existing behavior to be (very slightly:) buggy.

If someone was using the existing behavior to some end, they can always stick with the prior versions and/or open issues explaining their need:)

Anyhow, I will come up with a PR soon.