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 , function TestRaft_server_recv_requestvote_response_increase_votes_for_me may have some error. 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);
this action will increase term id to 2;
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);
this action wont increase vote because rcr.termid =1 < current term id;
CuAssertTrue(tc, 1 == raft_get_nvotes_for_me(r));
} wonder is this a mistake or my understanding error?
The text was updated successfully, but these errors were encountered:
f2ee69f
Thank you for discovering this! The test was badly written.
I've now fixed it.
Sorry, something went wrong.
No branches or pull requests
in Test_server.c , function TestRaft_server_recv_requestvote_response_increase_votes_for_me may have some error.
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);
this action will increase term id to 2;
this action will increase term id to 2;
this action wont increase vote because rcr.termid =1 < current term id;
}
wonder is this a mistake or my understanding error?
The text was updated successfully, but these errors were encountered: