tests: matrix: show content detail on mismatch

This commit is contained in:
Jakob Unterwurzacher 2021-06-26 18:58:29 +02:00
parent 4fd95b718b
commit 446c3d7e93
1 changed files with 2 additions and 1 deletions

View File

@ -119,7 +119,8 @@ func TestConcurrentReadCreate(t *testing.T) {
}
buf := buf0[:n]
if bytes.Compare(buf, content) != 0 {
log.Fatal("content mismatch")
// Calling t.Fatal() from a goroutine hangs the test so we use log.Fatal
log.Fatalf("%s: content mismatch: have=%q want=%q", t.Name(), string(buf), string(content))
}
f.Close()
}