diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2c237f4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +on: [push, pull_request] + +jobs: + unit: + strategy: + fail-fast: false + matrix: + os: [ "ubuntu", "windows", "macos" ] + go: [ "1.24.x", "1.25.x" ] + runs-on: ${{ matrix.os }}-latest + name: Tests (${{ matrix.os}}, Go ${{ matrix.go }}) + timeout-minutes: 10 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go }} + - run: go version + - name: run tests + run: go test -v -shuffle on ./... diff --git a/v2_encode_test.go b/v2_encode_test.go index c2df1ea..48c3b5d 100644 --- a/v2_encode_test.go +++ b/v2_encode_test.go @@ -14,9 +14,7 @@ import ( "regexp" "runtime/debug" "strconv" - "sync" "testing" - "testing/synctest" "time" ) @@ -1408,21 +1406,3 @@ func TestIssue63379(t *testing.T) { } } } - -// Issue #73733: encoding/json used a WaitGroup to coordinate access to cache entries. -// Since WaitGroup.Wait is durably blocking, this caused apparent deadlocks when -// multiple bubbles called json.Marshal at the same time. -func TestSynctestMarshal(t *testing.T) { - var wg sync.WaitGroup - for range 5 { - wg.Go(func() { - synctest.Test(t, func(t *testing.T) { - _, err := Marshal([]string{}) - if err != nil { - t.Errorf("Marshal: %v", err) - } - }) - }) - } - wg.Wait() -}