Fix goroutine test fatalf (#6682)

Use t.Error/t.ErrorF instead if t.Fatal/t.Fatalf

Add returns to achieve same behaviour as earlier
This commit is contained in:
Pontus Leitzler
2018-10-23 18:44:20 +02:00
committed by kannappanr
parent 7b7be66fa1
commit 9631d65552
5 changed files with 26 additions and 13 deletions

View File

@@ -161,11 +161,13 @@ func TestLockAndUnlock(t *testing.T) {
go func() {
bl, blerr := LockedOpenFile(f.Name(), os.O_WRONLY, 0600)
if blerr != nil {
t.Fatal(blerr)
t.Error(blerr)
return
}
locked <- struct{}{}
if blerr = bl.Close(); blerr != nil {
t.Fatal(blerr)
t.Error(blerr)
return
}
}()