feat(storage): remove unnecessary lines from verify-wal test

pull/14221/head
Adam Perlin 2019-06-27 11:03:03 -07:00
parent f4faa9b2f5
commit fba4326c72
1 changed files with 1 additions and 10 deletions

View File

@ -138,22 +138,13 @@ func writeCorruptEntries(file *os.File, t *testing.T, n int) {
}
}
// Write some random bytes to the file to simulate corruption.
if _, err := file.Write(corruption); err != nil {
fatal(t, "corrupt WAL segment", err)
}
corrupt := []byte{1, 255, 0, 3, 45, 26, 110}
wrote, err := file.Write(corrupt)
if err != nil {
t.Fatal(err)
} else if wrote != len(corrupt) {
t.Fatal("Error writing corrupt data to file")
}
if err := file.Close(); err != nil {
t.Fatalf("Error: filed to close file: %v\n", err)
t.Fatalf("Error: failed to close file: %v\n", err)
}
}