]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] database/sql: convert test timeouts to explicit waits with...
authorDaniel Theophanes <kardianos@gmail.com>
Sun, 12 Feb 2017 23:12:52 +0000 (15:12 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 13 Feb 2017 19:22:34 +0000 (19:22 +0000)
commitae13ccfd6dee7113d11aba0c1c287bfa2897488d
tree5b2149c78d0fc4d2fd921e3b4091c755ab371e1a
parent7cec9a583d81a3b518795cc2a49cd6296e45c69b
[release-branch.go1.8] database/sql: convert test timeouts to explicit waits with checks

When testing context cancelation behavior do not rely on context
timeouts. Use explicit checks in all such tests. In closeDB
convert the simple check for zero open conns with a wait loop
for zero open conns.

Fixes #19024
Fixes #19041

Change-Id: Iecfcc4467e91249fceb21ffd1f7c62c58140d8e9
Reviewed-on: https://go-review.googlesource.com/36902
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/36917
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
src/database/sql/sql_test.go