Skip to content

Commit

Permalink
test: fix concurrent database access
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Feb 27, 2022
1 parent ae87914 commit 46f6fb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions persistence/sql/persister_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sql_test
import (
"context"
"fmt"
"github.com/ory/x/dbal"
"os"
"path/filepath"
"sync"
Expand Down Expand Up @@ -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() {
Expand All @@ -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))
Expand Down

0 comments on commit 46f6fb7

Please sign in to comment.