0

We're using @EmbeddedKafka, and in application-test.yml we have

kafka:
  confluentBootstrapAddress: ${spring.embedded.kafka.brokers}

I can see that confluentBootstrapAddress is null.

However, if in debug mode i check this

this.resolveEmbeddedValue("${spring.embedded.kafka.brokers}") = "127.0.0.1:51020"

then i can see that the value exists, and that the embedded Kafka was indeed started.

What could be the issue? A lifecycle / moment mismatch between the moment that application.yml is evaluated and when the embedded broker is started?

NicuMarasoiu
  • 776
  • 9
  • 25

1 Answers1

0

Actually there was an error in the test setup that was using @Profile instead of @ActiveProfiles. Changing that to ActiveProfiles made that Spring Test take into account the "spring-profile.properties".

NicuMarasoiu
  • 776
  • 9
  • 25