jsancio commented on a change in pull request #9476: URL: https://github.com/apache/kafka/pull/9476#discussion_r509857027
########## File path: raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java ########## @@ -1729,126 +1695,156 @@ public void testLeaderGracefulShutdownTimeout() throws Exception { public void testFollowerGracefulShutdown() throws Exception { int otherNodeId = 1; int epoch = 5; + Set<Integer> voters = Utils.mkSet(LOCAL_ID, otherNodeId); - Set<Integer> voters = Utils.mkSet(localId, otherNodeId); - quorumStateStore.writeElectionState(ElectionState.withElectedLeader(epoch, otherNodeId, voters)); - KafkaRaftClient client = buildClient(voters); - assertEquals(ElectionState.withElectedLeader(epoch, otherNodeId, voters), quorumStateStore.readElectionState()); + RaftClientTestContext context = new RaftClientTestContext.Builder() + .updateQuorumStateStore(quorumStateStore -> { Review comment: Thanks for the suggestion. I implemented this. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org