Make wal the default for sqlite resource pieces

Fixes broken test as a result.
This commit is contained in:
Matt Joiner 2021-05-17 11:51:24 +10:00
parent 7798e2a306
commit b21aebeaae
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@ func newConnsAndProv(t *testing.T, opts NewPoolOpts) (ConnPool, *provider) {
// sqlitex.Pool.Close doesn't like being called more than once. Let it slide for now.
//t.Cleanup(func() { pool.Close() })
qt.Assert(t, initPoolDatabase(pool, InitDbOpts{}), qt.IsNil)
if !opts.Memory && opts.SetJournalMode == "" {
opts.SetJournalMode = "wal"
}
qt.Assert(t, initPoolConns(nil, pool, opts.InitConnOpts), qt.IsNil)
prov, err := NewProvider(pool, ProviderOpts{BatchWrites: pool.NumConns() > 1})
require.NoError(t, err)