Commit 9d5b106d authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Fix a few more warnings

parent 12302c06
Pipeline #424955 passed with stages
in 47 minutes and 43 seconds
......@@ -574,7 +574,9 @@ TEST_F(Raft_Election, basic_sanity) {
// term mismatch, can't perform election
RaftVoteRequest votereq;
votereq.lastIndex = 1;
votereq.term = 1;
votereq.lastTerm = 0;
ASSERT_FALSE(RaftElection::perform(votereq, *state(), *lease(), *contactDetails()));
// we have a leader already, can't do election
......@@ -597,6 +599,7 @@ TEST_F(Raft_Election, leader_cannot_call_election) {
RaftVoteRequest votereq;
votereq.lastIndex = 5;
votereq.term = 2;
votereq.lastTerm = 1;
ASSERT_FALSE(RaftElection::perform(votereq, *state(), *lease(), *contactDetails()));
}
......@@ -611,6 +614,8 @@ TEST_F(Raft_Election, observer_cannot_call_election) {
RaftVoteRequest votereq;
votereq.term = 1;
votereq.lastTerm = 0;
votereq.lastIndex = 5;
ASSERT_FALSE(RaftElection::perform(votereq, *state(), *lease(), *contactDetails()));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment