I have a strange issues. I have a series of test that sometimes use messages on Kafka queue that is received form the listener (all within same distance of the application) and then processed. Kafka is instantiated with the help of Docker.
In the test class is have a repository annotated with @MockBean, and that repository is used also within the Kafka listener.
When is rune the test inside Idea all work and within the listener the repository interface is exalt the mocked bean.
When the tests are executed using Gradle on terminal, sometimes not always, within the lister is used the real repository and not the mocked one.
Thank you for the help.