summaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-31 13:45:14 +0100
committerJakob Unterwurzacher2015-11-01 01:36:19 +0100
commit3e3685127340571dca40f0c16cbaa3d272689f4f (patch)
tree4f7a5ef278ff9b3c09547a1195d5fdbe914e5e3c /main_test.go
parenteac1f5421375913b871132d389dc69393a9ac232 (diff)
TestRmwRace: abort testing on write failures
Continuing the test will just generate useless noise
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main_test.go b/main_test.go
index 8ae7b12..b5b2d35 100644
--- a/main_test.go
+++ b/main_test.go
@@ -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