diff --git a/tests/parallel/parallel_test.go b/tests/parallel/parallel_test.go index 7ecbd2b..9045b9d 100644 --- a/tests/parallel/parallel_test.go +++ b/tests/parallel/parallel_test.go @@ -1,7 +1,9 @@ package tests import ( + "errors" "io" + "log" "net/url" "os" "os/exec" @@ -19,6 +21,20 @@ import ( "github.com/ncruces/go-sqlite3/vfs/memdb" ) +func TestMain(m *testing.M) { + sqlite3.AutoExtension(func(c *sqlite3.Conn) error { + return c.ConfigLog(func(code sqlite3.ExtendedErrorCode, msg string) { + // Having to do journal recovery is unexpected. + if errors.Is(code, sqlite3.NOTICE) { + log.Panicf("%v (%d): %s", code, code, msg) + } else { + log.Printf("%v (%d): %s", code, code, msg) + } + }) + }) + m.Run() +} + func Test_parallel(t *testing.T) { if !vfs.SupportsFileLocking { t.Skip("skipping without locks")