squah-confluent commented on code in PR #23883:
URL: https://github.com/apache/kafka/pull/23883#discussion_r4339726157


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/assignor/uniform2/TopicsFixture.java:
##########
@@ -45,12 +48,38 @@ public TopicsFixture withTopic(Uuid topicId, int 
partitions) {
     }
 
     /**
-     * @return The describer of the topics.
+     * Builds the metadata image and the describer of the topics.
+     *
+     * @return This fixture.
      */
-    public SubscribedTopicDescriber build() {
+    public TopicsFixture build() {
         checkNotBuilt();
         built = true;
-        return new 
SubscribedTopicDescriberImpl(image.buildCoordinatorMetadataImage());
+        metadataImage = image.buildCoordinatorMetadataImage();
+        subscribedTopicsDescriber = new 
SubscribedTopicDescriberImpl(metadataImage);
+        return this;
+    }
+
+    /**
+     * @return The metadata image of the topics.
+     */
+    public CoordinatorMetadataImage metadataImage() {
+        checkBuilt();
+        return metadataImage;
+    }
+
+    /**
+     * @return The describer of the topics.
+     */
+    public SubscribedTopicDescriber subscribedTopicsDescriber() {
+        checkBuilt();
+        return subscribedTopicsDescriber;
+    }
+

Review Comment:
   It's less churn if we pass an empty metadata image in `GroupSpecFixture`. 
Did that instead.



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