Explorar o código

raft: fix error message in TestLogRestore

Xiang Li %!s(int64=11) %!d(string=hai) anos
pai
achega
62a8df304a
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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)