raft: fixed some typos and simplify minor logic
This commit is contained in:
@ -265,7 +265,7 @@ func TestLogMaybeAppend(t *testing.T) {
|
||||
t.Fatalf("unexpected error %v", err)
|
||||
}
|
||||
if !reflect.DeepEqual(tt.ents, gents) {
|
||||
t.Errorf("%d: appended entries = %v, want %v", i, gents, tt.ents)
|
||||
t.Errorf("#%d: appended entries = %v, want %v", i, gents, tt.ents)
|
||||
}
|
||||
}
|
||||
}()
|
||||
@ -671,13 +671,13 @@ func TestIsOutOfBounds(t *testing.T) {
|
||||
}()
|
||||
err := l.mustCheckOutOfBounds(tt.lo, tt.hi)
|
||||
if tt.wpanic {
|
||||
t.Errorf("%d: panic = %v, want %v", i, false, true)
|
||||
t.Errorf("#%d: panic = %v, want %v", i, false, true)
|
||||
}
|
||||
if tt.wErrCompacted && err != ErrCompacted {
|
||||
t.Errorf("%d: err = %v, want %v", i, err, ErrCompacted)
|
||||
t.Errorf("#%d: err = %v, want %v", i, err, ErrCompacted)
|
||||
}
|
||||
if !tt.wErrCompacted && err != nil {
|
||||
t.Errorf("%d: unexpected err %v", i, err)
|
||||
t.Errorf("#%d: unexpected err %v", i, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
Reference in New Issue
Block a user