-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Following the example of using @embeddedkafka with KafkaEmbedded in the documentation worked fine in many situations, but found that when executing on build servers as part of a gradle build my tests would succeed, but the overall build would fail with "Process 'Gradle Test Executor 1' finished with non-zero exit value 1".
This was due to improper shutdown of Zookeeper or Kafka originating from the embedded Kafka. I wasn't able to trace down exactly where it was happening, but I determined that if properly shutdown KafkaEmbedded.after() this would not occur. And this would would also get called if the JUnit Rule were used, which wasn't mentioned in the example from the docs and should look like this.
@Autowired @Rule public KafkaEmbedded kafkaEmbedded;
I don't know if anything more should be done about it, but I would propose to update the example in the documentation, it was rather difficult to isolate the cause.