2
0

Fix Open with OpenFromConnPool

This commit is contained in:
Jack Christensen
2014-06-21 17:33:30 -05:00
parent 7d0e178424
commit bdb5387646
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -117,10 +117,18 @@ func TestOpenFromConnPool(t *testing.T) {
}
defer closeDB(t, db)
// Can get pgx.ConnPool from driver
driver := db.Driver().(*stdlib.Driver)
if driver.Pool == nil {
t.Fatal("Expected driver opened through OpenFromConnPool to have Pool, but it did not")
}
// Normal sql/database still works
var n int64
err = db.QueryRow("select 1").Scan(&n)
if err != nil {
t.Fatalf("db.QueryRow unexpectedly failed: %v", err)
}
}
func TestStmtExec(t *testing.T) {