From 46f6fb7d246b384e561bdf8952185855f25cce56 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Sun, 27 Feb 2022 16:03:21 +0100 Subject: [PATCH] test: fix concurrent database access --- persistence/sql/persister_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/persistence/sql/persister_test.go b/persistence/sql/persister_test.go index e5a55733be20..8e8c97b66039 100644 --- a/persistence/sql/persister_test.go +++ b/persistence/sql/persister_test.go @@ -3,6 +3,7 @@ package sql_test import ( "context" "fmt" + "github.com/ory/x/dbal" "os" "path/filepath" "sync" @@ -93,7 +94,7 @@ func pl(t *testing.T) func(lvl logging.Level, s string, args ...interface{}) { } func createCleanDatabases(t *testing.T) map[string]*driver.RegistryDefault { - conns := map[string]string{"sqlite": sqlite} + conns := map[string]string{"sqlite": dbal.SQLiteSharedInMemory} var l sync.Mutex if !testing.Short() { @@ -119,8 +120,6 @@ func createCleanDatabases(t *testing.T) map[string]*driver.RegistryDefault { wg.Wait() } - t.Logf("sqlite: %s", sqlite) - ps := make(map[string]*driver.RegistryDefault, len(conns)) var wg sync.WaitGroup wg.Add(len(conns))