From 296ddf7cd7934b7929ec495757f11a65eafdb215 Mon Sep 17 00:00:00 2001 From: mattn Date: Tue, 25 Aug 2015 23:40:01 +0900 Subject: [PATCH] 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 . --- sqlite3_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqlite3_test.go b/sqlite3_test.go index 423f30e..9760f01 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -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)