wal: clean up code format

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-07-21 15:48:05 -07:00
parent 1c04820026
commit 6fabe6d5ab
2 changed files with 2 additions and 5 deletions

View File

@ -153,10 +153,7 @@ func TestRepairWriteTearLast(t *testing.T) {
if terr := f.Truncate(1024); terr != nil {
return terr
}
if terr := f.Truncate(offset); terr != nil {
return terr
}
return nil
return f.Truncate(offset)
}
testRepair(t, makeEnts(50), corruptf, 40)
}

View File

@ -273,7 +273,7 @@ func TestSaveWithCut(t *testing.T) {
const EntrySize int = 500
SegmentSizeBytes = 2 * 1024
defer func() { SegmentSizeBytes = restoreLater }()
var index uint64 = 0
index := uint64(0)
for totalSize := 0; totalSize < int(SegmentSizeBytes); totalSize += EntrySize {
ents := []raftpb.Entry{{Index: index, Term: 1, Data: bigData}}
if err = w.Save(state, ents); err != nil {