TestRmwRace: abort testing on write failures

Continuing the test will just generate useless noise
This commit is contained in:
Jakob Unterwurzacher 2015-10-31 13:45:14 +01:00
parent eac1f54213
commit 3e36851273

View File

@ -232,11 +232,11 @@ func TestRmwRace(t *testing.T) {
fn := plainDir + "rmwrace"
f1, err := os.Create(fn)
if err != nil {
t.Errorf("file create failed")
t.Fatalf("file create failed")
}
f2, err := os.Create(fn)
if err != nil {
t.Errorf("file create failed")
t.Fatalf("file create failed")
}
oldBlock := bytes.Repeat([]byte("o"), 4096)
@ -255,7 +255,7 @@ func TestRmwRace(t *testing.T) {
// Reset to [ooooooooo]
_, err = f1.WriteAt(oldBlock, 0)
if err != nil {
t.Errorf("Write failed")
t.Fatalf("Write failed")
}
var wg sync.WaitGroup