Commit e39eda13 authored by Alberto García Hierro's avatar Alberto García Hierro Committed by Brad Fitzpatrick

database/sql: make tests repeatable with -cpu=n,n

New test added in CL 14611045 causes a deadlock when
running the tests with -cpu=n,n because the fakedb
driver always waits when opening a new connection after
running TestConnectionLeak.  Reset its state after.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/14780043
parent 078bcffc
......@@ -151,6 +151,8 @@ func (d *fakeDriver) Open(dsn string) (driver.Conn, error) {
if d.waitCh != nil {
d.waitingCh <- struct{}{}
<-d.waitCh
d.waitCh = nil
d.waitingCh = nil
}
return conn, nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment