File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 9696
9797 - name : test
9898 run : |
99- go test -v '-covermode=count ' '-coverprofile=coverage.out'
99+ go test -v '-race' '- covermode=atomic ' '-coverprofile=coverage.out'
100100
101101 - name : Send coverage
102102 uses : shogo82148/actions-goveralls@v1
Original file line number Diff line number Diff line change @@ -1872,7 +1872,6 @@ func TestConcurrent(t *testing.T) {
18721872 defer wg .Done ()
18731873
18741874 tx , err := dbt .db .Begin ()
1875- atomic .AddInt32 (& remaining , - 1 )
18761875
18771876 if err != nil {
18781877 if err .Error () != "Error 1040: Too many connections" {
@@ -1882,7 +1881,7 @@ func TestConcurrent(t *testing.T) {
18821881 }
18831882
18841883 // keep the connection busy until all connections are open
1885- for remaining > 0 {
1884+ for atomic . AddInt32 ( & remaining , - 1 ) > 0 {
18861885 if _ , err = tx .Exec ("DO 1" ); err != nil {
18871886 fatalf ("error on conn %d: %s" , id , err .Error ())
18881887 return
You can’t perform that action at this time.
0 commit comments