Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3608,6 +3608,12 @@ func runCallCommand(dbt *DBTest, query, name string) {
func TestIssue1567(t *testing.T) {
// enable TLS.
runTests(t, dsn+"&tls=skip-verify", func(dbt *DBTest) {
var max int
err := dbt.db.QueryRow("SELECT @@max_connections").Scan(&max)
if err != nil {
dbt.Fatalf("%s", err.Error())
}

// disable connection pooling.
// data race happens when new connection is created.
dbt.db.SetMaxIdleConns(0)
Expand All @@ -3627,6 +3633,9 @@ func TestIssue1567(t *testing.T) {
if testing.Short() {
count = 10
}
if count > max {
count = max
}

for i := 0; i < count; i++ {
timeout := time.Duration(mrand.Int63n(int64(rtt)))
Expand Down
Loading