Open ojab opened 2 years ago
So, basically you want to test abstract consumers right?
Yep!
Now we could get into an argument whether or not you should test abstract classes or their applications ;)
I will think what to do with this in the upcoming days though.
Overall adding documentation would be fine, I guess, since at least in this particular project it's tested in a single spec and adding consumer.topic
is not a big deal.
@ojab would you mind expanding the docs? They are a wiki: https://github.com/karafka/wiki/blob/master/Testing.md so you can just PR.
Moved to wiki as it is for docs expansion
We have something like
with a bunch of code handling unknown messages, errors and adding some context for metrics and error reporting in
AppicationConsumer
and all other consumers inherited from this one. In specs it's tested (or was tested in karafka-1) likeand with karafka-2 it fails because karafka-testing implies that consumer has topic set, for example here and here. It could be workarounded by
but would be good to retain the ability to test topic-less consumers or at least simplify/document how consumer group should be created.