ji-seung-ryu commented on code in PR #19786: URL: https://github.com/apache/kafka/pull/19786#discussion_r2105831583
########## core/src/test/java/kafka/server/share/SharePartitionManagerTest.java: ########## @@ -3158,6 +3180,26 @@ static Seq<Tuple2<TopicIdPartition, LogReadResult>> buildLogReadResult(List<Topi )))); return CollectionConverters.asScala(logReadResults).toSeq(); } + static Seq<Tuple2<TopicIdPartition, LogReadResult>> buildLogReadResultWithFakeRecords(List<TopicIdPartition> topicIdPartitions) { + List<Tuple2<TopicIdPartition, LogReadResult>> logReadResults = new ArrayList<>(); + for (TopicIdPartition topicIdPartition : topicIdPartitions) { + MemoryRecords records = MemoryRecords.withRecords( + Compression.NONE, + new SimpleRecord("test-key".getBytes(), "test-value".getBytes()) + ); + + LogReadResult logReadResult = new LogReadResult( + new FetchDataInfo(new LogOffsetMetadata(0, 0, 0), records), + Option.empty(), + -1L, -1L, -1L, -1L, -1L, + Option.empty(), Option.empty(), Option.empty() + ); + + logReadResults.add(new Tuple2<>(topicIdPartition, logReadResult)); + } + + return CollectionConverters.asScala(logReadResults).toSeq(); + } Review Comment: okay, I will change that way. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org