mirror of https://github.com/mattn/go-sqlite3.git
Fix test. Close #216
When one goroutine close db that opended as :memory:, session will be lost. So another goroutine can't refer the last session. goroutine .
This commit is contained in:
parent
8897bf1452
commit
296ddf7cd7
|
@ -769,10 +769,12 @@ func TestTimezoneConversion(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSuite(t *testing.T) {
|
func TestSuite(t *testing.T) {
|
||||||
db, err := sql.Open("sqlite3", ":memory:")
|
tempFilename := TempFilename()
|
||||||
|
db, err := sql.Open("sqlite3", tempFilename+"?_busy_timeout=99999")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
defer os.Remove(tempFilename)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
sqlite3_test.RunTests(t, db, sqlite3_test.SQLITE)
|
sqlite3_test.RunTests(t, db, sqlite3_test.SQLITE)
|
||||||
|
|
Loading…
Reference in New Issue