We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3798012 commit 685bdedCopy full SHA for 685bded
driver_test.go
@@ -1872,7 +1872,6 @@ func TestConcurrent(t *testing.T) {
1872
defer wg.Done()
1873
1874
tx, err := dbt.db.Begin()
1875
- atomic.AddInt32(&remaining, -1)
1876
1877
if err != nil {
1878
if err.Error() != "Error 1040: Too many connections" {
@@ -1882,7 +1881,7 @@ func TestConcurrent(t *testing.T) {
1882
1881
}
1883
1884
// keep the connection busy until all connections are open
1885
- for remaining > 0 {
+ for atomic.AddInt32(&remaining, -1) > 0 {
1886
if _, err = tx.Exec("DO 1"); err != nil {
1887
fatalf("error on conn %d: %s", id, err.Error())
1888
return
0 commit comments