Closed thabach closed 6 years ago
Thanks a lot! I used a slightly different approach in e8ec7dfea1f518131bb52158b4fcc2033f8c10a0 - it dirties the context before the test so that the test with the embedded Kafka get a new context that is set up correctly while the other tests use the original context. I added that code to the other Kafka-based tests, too. Let me know what you think!
I can dig it ;-)
The
KafkaTemplate
inShipmentKafkaTest::orderAreReceived
gets its template set tolocalhost:9092
asbootstrap.servers
on a shipping module or top-level (the project’s multi-module) Maven build.This pull request adds
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
annotations to all tests inmicro service-kafka-shipping
to make all tests pass nicely.