ableegoldman commented on a change in pull request #8668:
URL: https://github.com/apache/kafka/pull/8668#discussion_r432802669



##########
File path: 
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignorTest.java
##########
@@ -105,12 +106,16 @@ public void 
testOnlyAssignsPartitionsFromSubscribedTopics() {
         String otherTopic = "other";
 
         Map<String, Integer> partitionsPerTopic = new HashMap<>();
-        partitionsPerTopic.put(topic, 3);
-        partitionsPerTopic.put(otherTopic, 3);
-        subscriptions = Collections.singletonMap(consumerId, new 
Subscription(topics(topic)));

Review comment:
       This test was also starting with an illegal state -- 
`partitionsPerTopic` only contains metadata for topics included in the 
subscription. I noticed that we don't seem to be testing the actual valid case, 
where some consumers have `ownedPartitions` which are no longer in the 
subscription, so I just adapted this test for the related purpose




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to