libgo: Update to Go 1.2.1 release.
From-SVN: r208286
This commit is contained in:
parent
8c92028ea1
commit
a10d35a8ba
5 changed files with 70 additions and 12 deletions
|
@ -1005,6 +1005,29 @@ func TestMaxOpenConns(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSingleOpenConn(t *testing.T) {
|
||||
db := newTestDB(t, "people")
|
||||
defer closeDB(t, db)
|
||||
|
||||
db.SetMaxOpenConns(1)
|
||||
|
||||
rows, err := db.Query("SELECT|people|name|")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err = rows.Close(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// shouldn't deadlock
|
||||
rows, err = db.Query("SELECT|people|name|")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err = rows.Close(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// golang.org/issue/5323
|
||||
func TestStmtCloseDeps(t *testing.T) {
|
||||
if testing.Short() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue