diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f57e09..1659c10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,10 +32,13 @@ jobs: if: matrix.full-tests run: | curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | - sh -s -- -b $HOME/go/bin v1.51.0 + sh -s -- -b $HOME/go/bin v1.52.2 $HOME/go/bin/golangci-lint run --max-issues-per-linter 0 \ --max-same-issues 0 \ + --exclude="unused-parameter: parameter '[^']+' seems to be unused, consider removing or renaming it as _" \ + -E asciicheck \ -E bidichk \ + -E durationcheck \ -E exportloopref \ -E gocritic \ -E godot \ diff --git a/race_test.go b/race_test.go index 5afc89e..fd94097 100644 --- a/race_test.go +++ b/race_test.go @@ -2,13 +2,20 @@ package httpmock_test import ( "net/http" + "sync" "testing" . "github.com/jarcoal/httpmock" ) func TestActivateNonDefaultRace(t *testing.T) { + var wg sync.WaitGroup + wg.Add(10) for i := 0; i < 10; i++ { - go ActivateNonDefault(&http.Client{}) + go func() { + defer wg.Done() + ActivateNonDefault(&http.Client{}) + }() } + wg.Wait() }