modified the description in TestRestoreIgnoreSnapshot2C (#236)

This commit is contained in:
Yixiao Chen 2021-01-21 20:45:38 +08:00 committed by GitHub
parent 59265ae04d
commit 2f4bc66416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
} }
} }