ahuang98 commented on code in PR #16637: URL: https://github.com/apache/kafka/pull/16637#discussion_r1690568468
########## raft/src/test/java/org/apache/kafka/raft/RaftClientTestContext.java: ########## @@ -648,19 +648,41 @@ void assertSentDescribeQuorumResponse( long highWatermark, List<ReplicaState> voterStates, List<ReplicaState> observerStates + ) { + assertSentDescribeQuorumResponse(leaderId, leaderEpoch, highWatermark, voterStates, observerStates, Errors.NONE); + } + + void assertSentDescribeQuorumResponse( + int leaderId, + int leaderEpoch, + long highWatermark, + List<ReplicaState> voterStates, + List<ReplicaState> observerStates, + Errors error ) { DescribeQuorumResponseData response = collectDescribeQuorumResponse(); DescribeQuorumResponseData.PartitionData partitionData = new DescribeQuorumResponseData.PartitionData() - .setErrorCode(Errors.NONE.code()) + .setErrorCode(error.code()) Review Comment: Actually, `assertSentDescribeQuorumResponse` (and the test callers) use DescribeQuorumResponseData.ReplicaState while RaftUtil uses LeaderState.ReplicaState, which is a bit annoying but I can make the conversion -- 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