Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 ./...
20 changes: 0 additions & 20 deletions v2_encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import (
"regexp"
"runtime/debug"
"strconv"
"sync"
"testing"
"testing/synctest"
"time"
)

Expand Down Expand Up @@ -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()
}
Loading