aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql_test.go
diff options
context:
space:
mode:
authorDaniel Theophanes <kardianos@gmail.com>2017-10-17 22:04:17 +0000
committerDaniel Theophanes <kardianos@gmail.com>2017-10-17 23:02:14 +0000
commit292366e7162a030cade7b177eb4ad55bd887d25f (patch)
tree496777946cb512f56dfd18d6a57dbb5e73b9b033 /src/database/sql/sql_test.go
parent94e3a304524b6090686ace233a8bba97aa4f306a (diff)
downloadgo-292366e7162a030cade7b177eb4ad55bd887d25f.tar.xz
Revert "database/sql: prevent race in driver by locking dc in Next"
This reverts commit 897080d5cbb1793f8ad3ef5fb7c6fafba2e97d42. Reason for revert: Fails to fix all the locking issues. Updates #21117 Change-Id: I6fc9cb7897244d6e1af78c089a2bf383258ec049 Reviewed-on: https://go-review.googlesource.com/71450 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/database/sql/sql_test.go')
-rw-r--r--src/database/sql/sql_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/database/sql/sql_test.go b/src/database/sql/sql_test.go
index 760159a9ac..046d95aff4 100644
--- a/src/database/sql/sql_test.go
+++ b/src/database/sql/sql_test.go
@@ -3127,9 +3127,6 @@ func TestIssue6081(t *testing.T) {
// In the test, a context is canceled while the query is in process so
// the internal rollback will run concurrently with the explicitly called
// Tx.Rollback.
-//
-// The addition of calling rows.Next also tests
-// Issue 21117.
func TestIssue18429(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
@@ -3140,7 +3137,7 @@ func TestIssue18429(t *testing.T) {
const milliWait = 30
- for i := 0; i < 1000; i++ {
+ for i := 0; i < 100; i++ {
sem <- true
wg.Add(1)
go func() {
@@ -3162,9 +3159,6 @@ func TestIssue18429(t *testing.T) {
// reported.
rows, _ := tx.QueryContext(ctx, "WAIT|"+qwait+"|SELECT|people|name|")
if rows != nil {
- // Call Next to test Issue 21117 and check for races.
- for rows.Next() {
- }
rows.Close()
}
// This call will race with the context cancel rollback to complete