kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-16287: Implement example tests for common rebalance callback

Open lucasbru opened this issue 1 year ago • 3 comments

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)

lucasbru avatar Feb 21 '24 13:02 lucasbru

@kirktrue Hope that helps!

lucasbru avatar Feb 21 '24 13:02 lucasbru

@lucasbru—Yes, this looks perfect!

kirktrue avatar Feb 22 '24 16:02 kirktrue

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 avatar Feb 23 '24 09:02 lucasbru

@lucasbru—sorry that I've forgotten, but why don't we want to merge this?

kirktrue avatar Apr 10 '24 17:04 kirktrue

@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 avatar Apr 11 '24 14:04 lucasbru

@lucasbru—I think it's worth adding the tests, even if we already know there are more to be added in the future.

kirktrue avatar Apr 12 '24 16:04 kirktrue

@cadonna could you please review this?

lucasbru avatar Apr 15 '24 07:04 lucasbru

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.

lianetm avatar May 08 '24 15:05 lianetm