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:
mattn 2015-08-25 23:40:01 +09:00
parent 8897bf1452
commit 296ddf7cd7
1 changed files with 3 additions and 1 deletions

View File

@ -769,10 +769,12 @@ func TestTimezoneConversion(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 {
t.Fatal(err)
}
defer os.Remove(tempFilename)
defer db.Close()
sqlite3_test.RunTests(t, db, sqlite3_test.SQLITE)