Hangleton commented on code in PR #13240:
URL: https://github.com/apache/kafka/pull/13240#discussion_r1205119564


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinatorTest.java:
##########
@@ -3981,23 +4348,13 @@ private void prepareJoinAndSyncResponse(String 
consumerId, int generation, List<
         }, syncGroupResponse(assignment, Errors.NONE));
     }
 
-    private Map<TopicPartition, Errors> 
partitionErrors(Collection<TopicPartition> partitions, Errors error) {
-        final Map<TopicPartition, Errors> errors = new HashMap<>();
-        for (TopicPartition partition : partitions) {
-            errors.put(partition, error);
-        }
-        return errors;
-    }
-
-    private void respondToOffsetCommitRequest(final Map<TopicPartition, Long> 
expectedOffsets, Errors error) {
-        Map<TopicPartition, Errors> errors = 
partitionErrors(expectedOffsets.keySet(), error);
-        client.respond(offsetCommitRequestMatcher(expectedOffsets), 
offsetCommitResponse(errors));
-    }
-
-    private MockClient.RequestMatcher offsetCommitRequestMatcher(final 
Map<TopicPartition, Long> expectedOffsets) {
+    private MockClient.RequestMatcher offsetCommitRequestMatcher(
+        Map<TopicPartition, Long> expectedOffsets,
+        Consumer<OffsetCommitRequest> requestConsumer

Review Comment:
   @dajac Sure, that makes sense to get rid of the consumer, since it is mixing 
test design pattern and overlap the responsibilities of the matcher as you 
pointed out.



-- 
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]

Reply via email to