Browse Source

raft: fix error message format in test

Xiang Li 11 years ago
parent
commit
8074a5b5a4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      raft/log_unstable_test.go

+ 2 - 2
raft/log_unstable_test.go

@@ -199,10 +199,10 @@ func TestUnstableRestore(t *testing.T) {
 	u.restore(s)
 
 	if u.offset != s.Metadata.Index+1 {
-		t.Errorf("offset = %d, want %d", u.offset != s.Metadata.Index+1)
+		t.Errorf("offset = %d, want %d", u.offset, s.Metadata.Index+1)
 	}
 	if len(u.entries) != 0 {
-		t.Errorf("len = %d, want 0", len(u.entries), 0)
+		t.Errorf("len = %d, want 0", len(u.entries))
 	}
 	if !reflect.DeepEqual(u.snapshot, &s) {
 		t.Errorf("snap = %v, want %v", u.snapshot, &s)