Skip to content

Commit 8ba62ef

Browse files
use old sync.WaitGroup API in tests
1 parent 18902c2 commit 8ba62ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

v2_encode_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,14 +1415,16 @@ func TestIssue63379(t *testing.T) {
14151415
func TestSynctestMarshal(t *testing.T) {
14161416
var wg sync.WaitGroup
14171417
for range 5 {
1418-
wg.Go(func() {
1418+
wg.Add(1)
1419+
go func() {
1420+
defer wg.Done()
14191421
synctest.Test(t, func(t *testing.T) {
14201422
_, err := Marshal([]string{})
14211423
if err != nil {
14221424
t.Errorf("Marshal: %v", err)
14231425
}
14241426
})
1425-
})
1427+
}()
14261428
}
14271429
wg.Wait()
14281430
}

0 commit comments

Comments
 (0)