vamossagar12 commented on code in PR #14955: URL: https://github.com/apache/kafka/pull/14955#discussion_r1438796599
########## clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java: ########## @@ -1014,7 +1014,9 @@ synchronized public DescribeLogDirsResult describeLogDirs(Collection<Integer> br for (Node node : nodes) { Map<String, LogDirDescription> logDirDescriptionMap = unwrappedResults.get(node.id()); LogDirDescription logDirDescription = logDirDescriptionMap.getOrDefault(partitionLogDirs.get(0), new LogDirDescription(null, new HashMap<>())); - logDirDescription.replicaInfos().put(new TopicPartition(topicName, topicPartitionInfo.partition()), new ReplicaInfo(0, 0, false)); + Map<TopicPartition, ReplicaInfo> topicPartitionReplicaInfoMap = new HashMap<>(logDirDescription.replicaInfos()); + topicPartitionReplicaInfoMap.put(new TopicPartition(topicName, topicPartitionInfo.partition()), new ReplicaInfo(0, 0, false)); + logDirDescriptionMap.put(partitionLogDirs.get(0), new LogDirDescription(logDirDescription.error(), topicPartitionReplicaInfoMap)); Review Comment: Instead of setting unknown bytes for `totalBytes` and `usableBytes` for the new `LogDirDescription` object, I think we should use the `totalBytes` and `usableBytes` as well from the existing `LogDirDescription` object. -- 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