Replies: 1 comment
-
It is, however it lives in the test artifice from core, so you have to add that as a dep to access it. However, in 0.6, we're moving it into the main code, so it's easier. FYI created to track: To import the test dep, use: Also, check out this comment out. You can use MockConsumer as well, but it's a PITA (hence LongPollingMockConsumer) MockConsumer example - although I suggest you import the test dep from core, and use LongPollingMockConsumer: Are you able to find some examples of using LongPollingMockConsumer with PC? If not, I can point them out, or write a couple minimalistic ones. And finally - thank you VERY much for your help with the metrics stuff - much appreciated! Really looking forward to getting that in. Please reach out if you have more questions! :) |
Beta Was this translation helpful? Give feedback.
-
parallel-consumer-example-core is nice because it provides a minimal example of a parallel-consumer based application and some unit tests. However, tests rely on LongPollingMockConsumer which is not available to parallel-consumer users.
It degrades developer experience as one has to copy LongPollingMockConsumer (which isn't pleasant because it depends on other classes and Lombock) or to study it to understand what is required an what is not .
After spending some time trying to write an unit test it is still unclear to me why PC is complaining that epochOfPartition is null and will have to troubleshoot it.
It would be much nicer to either have a ready to use mock consumer or some examples that can be reused.
As a short term answer to my specific question, could you share a minimal unit test based on MockConsumer?
Beta Was this translation helpful? Give feedback.
All reactions