jeffkbkim commented on code in PR #12897: URL: https://github.com/apache/kafka/pull/12897#discussion_r1036383573
########## clients/src/test/java/org/apache/kafka/common/requests/RequestTestUtils.java: ########## @@ -208,10 +209,10 @@ public static MetadataResponse metadataUpdateWith(final String clusterId, for (int i = 0; i < numPartitions; i++) { TopicPartition tp = new TopicPartition(topic, i); Node leader = nodes.get(i % nodes.size()); - List<Integer> replicaIds = Collections.singletonList(leader.id()); + List<Integer> replicaIds = nodes.stream().map(Node::id).collect(Collectors.toList()); Review Comment: tests were failing, specifically the ones that were testing preferred read replica since it was using 2 nodes instead of 1. replica=[0,1] is expected with the new nodeIfOnline changes. this provides the expected behavior: all nodes that are passed in are part of the replica and isr set. -- 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