muralibasani commented on code in PR #22203:
URL: https://github.com/apache/kafka/pull/22203#discussion_r3213806509
##########
raft/src/test/java/org/apache/kafka/raft/QuorumStateTest.java:
##########
@@ -2514,14 +2541,31 @@ public void
testResignedToFollowerInSameEpoch(KRaftVersion kraftVersion) {
int node2 = 2;
int epoch = 5;
VoterSet voters = localWithRemoteVoterSet(IntStream.of(node1, node2),
kraftVersion);
- ElectionState election = ElectionState.withElectedLeader(epoch,
localId, Optional.empty(), voters.voterIds());
+ ElectionState election = ElectionState.withElectedLeader(
+ epoch,
+ localId,
+ Optional.of(localVoterKey),
+ voters.voterIds()
+ );
store.writeElectionState(election, kraftVersion);
QuorumState state = buildQuorumState(OptionalInt.of(localId), voters,
kraftVersion);
state.initialize(new OffsetAndEpoch(0L, logEndEpoch));
assertTrue(state.isResigned());
- assertThrows(IllegalStateException.class, () ->
state.transitionToFollower(epoch, localId, voters.listeners(localId)));
+ assertThrows(
+ IllegalStateException.class,
+ () -> state.transitionToFollower(epoch, localId,
voters.listeners(localId))
+ );
// KAFKA-18379 will fix this
Review Comment:
not very much related but if this comment is not relevant anymore, remove ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]