Moved Pinger test

This commit is contained in:
Gert-Jan Timmer 2018-06-20 22:51:38 +02:00
parent 81906d7428
commit aad2387aca
2 changed files with 17 additions and 17 deletions

View File

@ -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")
}
}

View File

@ -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) { func TestUpdateAndTransactionHooks(t *testing.T) {
var events []string var events []string
var commitHookReturn = 0 var commitHookReturn = 0