TUN-4060: Fix Go Vet warnings (new with go 1.16) where t.Fatalf is called from a test goroutine

This commit is contained in:
Nuno Diegues
2021-03-16 14:47:57 +00:00
parent d67fbbf94f
commit 8432735867
3 changed files with 8 additions and 4 deletions

View File

@@ -663,7 +663,8 @@ func AssertIfPipeReadable(t *testing.T, pipe io.ReadCloser) {
b := []byte{0}
n, err := pipe.Read(b)
if n > 0 {
t.Fatalf("read pipe was not empty")
t.Errorf("read pipe was not empty")
return
}
errC <- err
}()