diff --git a/driver/connection_go18_test.go b/driver/connection_go18_test.go index 2d87b4d..66cad43 100644 --- a/driver/connection_go18_test.go +++ b/driver/connection_go18_test.go @@ -154,3 +154,20 @@ func TestExecCancel(t *testing.T) { } } } + +func TestPinger(t *testing.T) { + db, err := sql.Open("sqlite3", ":memory:") + if err != nil { + t.Fatal(err) + } + err = db.Ping() + if err != nil { + t.Fatal(err) + } + db.Close() + err = db.Ping() + fmt.Println(err) + if err == nil { + t.Fatal("Should be closed") + } +} diff --git a/driver/driver_test.go b/driver/driver_test.go index ac2b9c7..7b3caea 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -1431,23 +1431,6 @@ func TestDeclTypes(t *testing.T) { } } -func TestPinger(t *testing.T) { - db, err := sql.Open("sqlite3", ":memory:") - if err != nil { - t.Fatal(err) - } - err = db.Ping() - if err != nil { - t.Fatal(err) - } - db.Close() - err = db.Ping() - fmt.Println(err) - if err == nil { - t.Fatal("Should be closed") - } -} - func TestUpdateAndTransactionHooks(t *testing.T) { var events []string var commitHookReturn = 0