We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in test_server.c
void TestRaft_server_recv_requestvote_response_increase_votes_for_me( CuTest * tc ) { void *r = raft_new(); raft_add_node(r, NULL, 1, 1); raft_add_node(r, NULL, 2, 0); raft_set_current_term(r, 1); CuAssertTrue(tc, 0 == raft_get_nvotes_for_me(r));
raft_become_candidate(r);
msg_requestvote_response_t rvr; memset(&rvr, 0, sizeof(msg_requestvote_response_t)); rvr.term = 1; rvr.vote_granted = 1;
raft_recv_requestvote_response(r, raft_get_node(r, 2), &rvr);
CuAssertTrue(tc, 1 == raft_get_nvotes_for_me(r));
}
wonder is my understanding error, or a mistake ,thanks!
The text was updated successfully, but these errors were encountered:
Hi I've already answered this in #28 😄
Please pull the latest version from Github?
Sorry, something went wrong.
sorry, i missed this.
No branches or pull requests
in test_server.c
void TestRaft_server_recv_requestvote_response_increase_votes_for_me(
CuTest * tc
)
{
void *r = raft_new();
raft_add_node(r, NULL, 1, 1);
raft_add_node(r, NULL, 2, 0);
raft_set_current_term(r, 1);
CuAssertTrue(tc, 0 == raft_get_nvotes_for_me(r));
vote for myself ,so vote nums is 1
raft_become_candidate(r);
recv vote response, so vote nums increases to 2
maybe this should be 2
}
wonder is my understanding error, or a mistake ,thanks!
The text was updated successfully, but these errors were encountered: