]> Cypherpunks repositories - gostls13.git/commit
database/sql: convert test timeouts to explicit waits with checks
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:05:28 +0000 (19:05 +0000)
commit50ab37d008fa830a6a1a7e27856ab248d5de816b
treeadca68df2529389e29f969ce0d12fc904a550ebc
parent3792db518327c685da17ca6c6faa4e1d2da4c33c
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>
src/database/sql/sql_test.go