lytt925 commented on code in PR #24241:
URL: https://github.com/apache/kafka/pull/24241#discussion_r4679577410
##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -756,24 +756,28 @@ public void
shouldIgnoreGroupInstanceIdForEmptyGroupId(GroupProtocol groupProtoc
@ParameterizedTest
@EnumSource(GroupProtocol.class)
- public void testSetRebalanceListenerWithoutGroupId(GroupProtocol
groupProtocol) {
- consumer = newConsumer(groupProtocol, null);
-
- assertDoesNotThrow(() ->
consumer.setRebalanceListener(mock(RebalanceListener.class)));
- }
+ @SuppressWarnings("unchecked")
+ public void testRebalanceListenerRegisteredWithoutGroupId(GroupProtocol
groupProtocol) {
+ ConsumerMetadata metadata = createMetadata(subscription);
+ MockClient client = new MockClient(time, metadata);
+ initMetadata(client, Map.of(topic, 1));
- @ParameterizedTest
- @EnumSource(GroupProtocol.class)
- public void
testRebalanceListenerNotInvokedWithManualAssignment(GroupProtocol
groupProtocol) {
- consumer = newConsumer(groupProtocol, groupId);
- RebalanceListener listener = mock(RebalanceListener.class);
+ consumer = newConsumer(groupProtocol, time, client, subscription,
metadata, assignor, false, null, groupInstanceId, false);
+ MockRebalanceListener listener = new MockRebalanceListener();
consumer.setRebalanceListener(listener);
- consumer.assign(List.of(tp0));
Review Comment:
Thank you. I added it back in 58c7d83.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]