kafka
kafka copied to clipboard
KAFKA-16287: Implement example tests for common rebalance callback
Add 6 example tests to the PlaintextConsumerTest
that tests using a ConsumerRebalanceListener
to invoke methods on the consumer.
This test is implemented in a reasonably general way with a view to using it as a template from which other tests can be created later. Eventually we will need to have a comprehensive set of tests that cover all the basic use cases.
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
@kirktrue Hope that helps!
@lucasbru—Yes, this looks perfect!
I'm keeping this around as an example, but I don't intend to merge this. I think we can merge it together with https://issues.apache.org/jira/browse/KAFKA-16111. Converting to a draft.
@lucasbru—sorry that I've forgotten, but why don't we want to merge this?
@kirktrue Just because it's meant to be an example, and doesn't cover all combinations. If you want me to merge it like this, we can do that as well.
@lucasbru—I think it's worth adding the tests, even if we already know there are more to be added in the future.
@cadonna could you please review this?
This LGTM @cadonna , left comment above discarding one of my messages, the test is clear enough. Only this other nit above about the test class description but I'll bring changes in the file soon after this goes in so ok to merge and I can improve it later.