You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, testing Kafka listeners typically involves @SpringBootTest and @EmbeddedKafka, which loads the entire application context (as documented here).
To enable more lightweight and focused testing of Kafka listeners, similar to how @WebMvcTest allows for testing web controllers in isolation, could anew new test slice be introduced? @KafkaListenerTest.
This slice would focus on testing a specific listener and its associated configuration (e.g., serialization/deserialization, error handlers) without the overhead of the full application context.
This could significantly improve the efficiency and speed of testing Kafka listener components.