chia7712 commented on code in PR #15962:
URL: https://github.com/apache/kafka/pull/15962#discussion_r1601713170


##########
storage/src/test/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManagerMultipleSubscriptionsTest.java:
##########
@@ -108,7 +114,23 @@ public void testMultiplePartitionSubscriptions() throws 
Exception {
         final TopicIdPartition followerTopicIdPartition = new 
TopicIdPartition(Uuid.randomUuid(), new TopicPartition(followerTopic, 0));
         final TopicIdPartition emptyTopicIdPartition = new 
TopicIdPartition(Uuid.randomUuid(), new TopicPartition(topicWithNoMessages, 0));
 
-        RemoteLogMetadataTopicPartitioner partitioner = new 
RemoteLogMetadataTopicPartitioner(10) {
+        final RemotePartitionMetadataStore spyRemotePartitionMetadataStore = 
spy(new RemotePartitionMetadataStore());
+
+        Phaser initializationPhaser = new Phaser(2); // 1 to register test 
thread, 1 to register leaderTopicIdPartition
+        doAnswer(invocationOnMock -> {
+            Object result = invocationOnMock.callRealMethod();
+            initializationPhaser.arriveAndDeregister();

Review Comment:
   The comments LGTM. thanks!



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