Browse Source

raft: fix error message in TestLogRestore

Xiang Li 11 years ago
parent
commit
62a8df304a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      raft/log_test.go

+ 1 - 2
raft/log_test.go

@@ -505,9 +505,8 @@ func TestLogRestore(t *testing.T) {
 	storage.ApplySnapshot(pb.Snapshot{Metadata: snap})
 	raftLog := newLog(storage)
 
-	// only has the guard entry
 	if len(raftLog.allEntries()) != 0 {
-		t.Errorf("len = %d, want 1", len(raftLog.allEntries()))
+		t.Errorf("len = %d, want 0", len(raftLog.allEntries()))
 	}
 	if raftLog.firstIndex() != index+1 {
 		t.Errorf("firstIndex = %d, want %d", raftLog.firstIndex(), index+1)