File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 96
96
97
97
- name : test
98
98
run : |
99
- go test -v '-covermode=count ' '-coverprofile=coverage.out'
99
+ go test -v '-race' '- covermode=atomic ' '-coverprofile=coverage.out'
100
100
101
101
- name : Send coverage
102
102
uses : shogo82148/actions-goveralls@v1
Original file line number Diff line number Diff line change @@ -1872,7 +1872,6 @@ func TestConcurrent(t *testing.T) {
1872
1872
defer wg .Done ()
1873
1873
1874
1874
tx , err := dbt .db .Begin ()
1875
- atomic .AddInt32 (& remaining , - 1 )
1876
1875
1877
1876
if err != nil {
1878
1877
if err .Error () != "Error 1040: Too many connections" {
@@ -1882,7 +1881,7 @@ func TestConcurrent(t *testing.T) {
1882
1881
}
1883
1882
1884
1883
// keep the connection busy until all connections are open
1885
- for remaining > 0 {
1884
+ for atomic . AddInt32 ( & remaining , - 1 ) > 0 {
1886
1885
if _ , err = tx .Exec ("DO 1" ); err != nil {
1887
1886
fatalf ("error on conn %d: %s" , id , err .Error ())
1888
1887
return
You can’t perform that action at this time.
0 commit comments