mirror of
https://github.com/talent-plan/tinykv.git
synced 2025-03-24 00:30:38 +08:00
modified the description in TestRestoreIgnoreSnapshot2C (#236)
This commit is contained in:
parent
59265ae04d
commit
2f4bc66416
@ -996,6 +996,7 @@ func TestRestoreIgnoreSnapshot2C(t *testing.T) {
|
|||||||
sm := newTestRaft(1, []uint64{1, 2}, 10, 1, storage)
|
sm := newTestRaft(1, []uint64{1, 2}, 10, 1, storage)
|
||||||
sm.RaftLog.committed = 3
|
sm.RaftLog.committed = 3
|
||||||
|
|
||||||
|
wcommit := uint64(3)
|
||||||
commit := uint64(1)
|
commit := uint64(1)
|
||||||
s := pb.Snapshot{
|
s := pb.Snapshot{
|
||||||
Metadata: &pb.SnapshotMetadata{
|
Metadata: &pb.SnapshotMetadata{
|
||||||
@ -1007,8 +1008,8 @@ func TestRestoreIgnoreSnapshot2C(t *testing.T) {
|
|||||||
|
|
||||||
// ignore snapshot
|
// ignore snapshot
|
||||||
sm.handleSnapshot(pb.Message{Snapshot: &s})
|
sm.handleSnapshot(pb.Message{Snapshot: &s})
|
||||||
if sm.RaftLog.committed == commit {
|
if sm.RaftLog.committed != wcommit {
|
||||||
t.Errorf("commit = %d, want %d", sm.RaftLog.committed, commit)
|
t.Errorf("commit = %d, want %d", sm.RaftLog.committed, wcommit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user