Skip to content

Commit 04db6a6

Browse files
gloratsimonsouter
authored andcommitted
Set embedded Kafka server to use localhost as advertised name so it works under all network conditions (#130)
1 parent 1ce623b commit 04db6a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testkit/src/main/scala/cakesolutions.kafka/testkit/KafkaServer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ object KafkaServer {
3131
val defaultConfig: Map[String, String] = Map(
3232
KafkaConfig.BrokerIdProp -> "1",
3333
KafkaConfig.ReplicaSocketTimeoutMsProp -> "1500",
34-
KafkaConfig.ControlledShutdownEnableProp -> "true"
34+
KafkaConfig.ControlledShutdownEnableProp -> "true",
35+
KafkaConfig.AdvertisedHostNameProp -> "localhost"
3536
)
3637

3738
/**

0 commit comments

Comments
 (0)