Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Willemt Raft
Commits
993cd3a3
Commit
993cd3a3
authored
Jul 24, 2015
by
Willem Thiart
Committed by
Peter Membrey
Jul 24, 2015
Browse files
Added test for #8
parent
4075e2cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_server.c
View file @
993cd3a3
...
...
@@ -1283,7 +1283,7 @@ void TestRaft_candidate_requestvote_includes_logidx(CuTest * tc)
sender
=
sender_new
(
NULL
);
r
=
raft_new
();
raft_set_configuration
(
r
,
cfg
,
0
);
raft_set_configuration
(
r
,
cfg
,
99
);
raft_set_state
(
r
,
RAFT_STATE_CANDIDATE
);
raft_set_callbacks
(
r
,
&
funcs
,
sender
);
...
...
@@ -1296,6 +1296,7 @@ void TestRaft_candidate_requestvote_includes_logidx(CuTest * tc)
CuAssertTrue
(
tc
,
3
==
rv
->
last_log_idx
);
CuAssertTrue
(
tc
,
5
==
rv
->
term
);
CuAssertTrue
(
tc
,
5
==
rv
->
last_log_term
);
CuAssertTrue
(
tc
,
99
==
rv
->
candidate_id
);
}
/* Candidate 5.2 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment