chore: build with Go 1.26; use Go 1.25 features (#10570)
WaitGroup.Go and built-in gomaxprocs handling. Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -82,9 +82,7 @@ func TestStressBufferPool(t *testing.T) {
|
||||
var wg sync.WaitGroup
|
||||
fail := make(chan struct{}, routines)
|
||||
for i := 0; i < routines; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
for time.Since(t0) < runtime {
|
||||
blocks := make([][]byte, 10)
|
||||
for i := range blocks {
|
||||
@@ -102,7 +100,7 @@ func TestStressBufferPool(t *testing.T) {
|
||||
bp.Put(blocks[i])
|
||||
}
|
||||
}
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
@@ -110,24 +110,18 @@ func TestCloseOnBlockingSend(t *testing.T) {
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Go(func() {
|
||||
c.ClusterConfig(&ClusterConfig{}, nil)
|
||||
wg.Done()
|
||||
}()
|
||||
})
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Go(func() {
|
||||
c.Close(errManual)
|
||||
wg.Done()
|
||||
}()
|
||||
})
|
||||
|
||||
// This simulates an error from ping timeout
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Go(func() {
|
||||
c.internalClose(ErrTimeout)
|
||||
wg.Done()
|
||||
}()
|
||||
})
|
||||
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user