1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:11:21 -06:00
go/src/database/sql
Brad Fitzpatrick 733aefd06e database/sql: deflake TestPendingConnsAfterErr and fix races, panics
TestPendingConnsAfterErr only cared that things didn't deadlock, so 5
seconds is a sufficient timer. We don't need 100 milliseconds.

I was able to reproduce with a tiny (5 nanosecond) timeout value,
instead of 100 milliseconds. In the process of testing with -race and
a high -count= value, I noticed several data races and panics
(sendings on a closed channel) which are also fixed in this change.

Fixes #15684

Change-Id: Ib4605fcc0f296e658cb948352ed642b801cb578c
Reviewed-on: https://go-review.googlesource.com/24550
Reviewed-by: Marko Tiikkaja <marko@joh.to>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-28 21:37:53 +00:00
..
driver database/sql/driver: remove string exclusion 2016-03-23 02:42:31 +00:00
convert_test.go database/sql: clone data for named []byte types 2016-04-30 18:40:36 +00:00
convert.go database/sql: clone data for named []byte types 2016-04-30 18:40:36 +00:00
doc.txt
example_test.go
fakedb_test.go all: delete dead test code 2016-03-21 07:10:08 +00:00
sql_test.go database/sql: deflake TestPendingConnsAfterErr and fix races, panics 2016-06-28 21:37:53 +00:00
sql.go database/sql: deflake TestPendingConnsAfterErr and fix races, panics 2016-06-28 21:37:53 +00:00