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
0e755635
Commit
0e755635
authored
Aug 16, 2018
by
Willem Thiart
Browse files
Refactor: snapshotting test raft_begin_snapshot usage
parent
6fbdcf34
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_snapshotting.c
View file @
0e755635
...
@@ -713,7 +713,7 @@ void TestRaft_cancel_snapshot_restores_state(CuTest* tc)
...
@@ -713,7 +713,7 @@ void TestRaft_cancel_snapshot_restores_state(CuTest* tc)
raft_recv_entry
(
r
,
&
ety
,
&
cr
);
raft_recv_entry
(
r
,
&
ety
,
&
cr
);
raft_set_commit_idx
(
r
,
2
);
raft_set_commit_idx
(
r
,
2
);
CuAssertIntEquals
(
tc
,
0
,
raft_begin_snapshot
(
r
));
CuAssertIntEquals
(
tc
,
0
,
raft_begin_snapshot
(
r
,
0
));
CuAssertIntEquals
(
tc
,
0
,
raft_end_snapshot
(
r
));
CuAssertIntEquals
(
tc
,
0
,
raft_end_snapshot
(
r
));
/* more entries */
/* more entries */
...
@@ -726,7 +726,7 @@ void TestRaft_cancel_snapshot_restores_state(CuTest* tc)
...
@@ -726,7 +726,7 @@ void TestRaft_cancel_snapshot_restores_state(CuTest* tc)
/* begin and cancel another snapshot */
/* begin and cancel another snapshot */
raft_set_commit_idx
(
r
,
4
);
raft_set_commit_idx
(
r
,
4
);
CuAssertIntEquals
(
tc
,
0
,
raft_begin_snapshot
(
r
));
CuAssertIntEquals
(
tc
,
0
,
raft_begin_snapshot
(
r
,
0
));
CuAssertIntEquals
(
tc
,
1
,
raft_snapshot_is_in_progress
(
r
));
CuAssertIntEquals
(
tc
,
1
,
raft_snapshot_is_in_progress
(
r
));
CuAssertIntEquals
(
tc
,
0
,
raft_cancel_snapshot
(
r
));
CuAssertIntEquals
(
tc
,
0
,
raft_cancel_snapshot
(
r
));
...
...
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