chore: bump minimum Go version to 1.25 (#7788)

This commit is contained in:
Ville Vesilehto
2026-02-16 15:28:30 +02:00
committed by GitHub
parent b1080a2934
commit 6fd38dca06
9 changed files with 26 additions and 50 deletions

View File

@@ -363,13 +363,11 @@ func TestCloudDNSConcurrentServeDNS(t *testing.T) {
var wg sync.WaitGroup
// Concurrently refresh zones to race with Lookup reads.
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
for range 50 {
_ = r.updateZones(ctx)
}
}()
})
const workers = 32
const iterations = 200

View File

@@ -67,11 +67,9 @@ func TestTransport(t *testing.T) {
}
var wg sync.WaitGroup
wg.Add(1)
go func() {
wg.Go(func() {
accept(t, l, 1)
wg.Done()
}()
})
dio := newIO(param[0], l.Addr().String(), 1, 1)
dio.tcpTimeout = 10 * time.Millisecond
@@ -97,11 +95,9 @@ func TestRace(t *testing.T) {
defer l.Close()
var wg sync.WaitGroup
wg.Add(1)
go func() {
wg.Go(func() {
accept(t, l, count)
wg.Done()
}()
})
dio := newIO("tcp", l.Addr().String(), 1, 1)
dio.tcpTimeout = 10 * time.Millisecond
@@ -132,11 +128,9 @@ func TestReconnect(t *testing.T) {
}
var wg sync.WaitGroup
wg.Add(1)
go func() {
wg.Go(func() {
accept(t, l, 1)
wg.Done()
}()
})
addr := l.Addr().String()
logger := MockLogger{}
@@ -164,11 +158,9 @@ func TestReconnect(t *testing.T) {
}
defer l.Close()
wg.Add(1)
go func() {
wg.Go(func() {
accept(t, l, 1)
wg.Done()
}()
})
messageCount := 5
for range messageCount {
@@ -249,11 +241,9 @@ func TestFullQueueWriteFail(t *testing.T) {
defer l.Close()
var wg sync.WaitGroup
wg.Add(1)
go func() {
wg.Go(func() {
accept(t, l, 1)
wg.Done()
}()
})
logger := MockLogger{}
dio := newIO("unix", l.Addr().String(), 1, 1)

View File

@@ -48,10 +48,8 @@ func xfr(state request.Request, truncate bool) {
}()
wg := new(sync.WaitGroup)
wg.Add(1)
go func() {
wg.Go(func() {
tr.Out(state.W, state.Req, ch)
wg.Done()
}()
})
wg.Wait()
}

View File

@@ -102,12 +102,10 @@ func TestShardEvictParallel(t *testing.T) {
start := make(chan struct{})
var wg sync.WaitGroup
for range shardSize {
wg.Add(1)
go func() {
wg.Go(func() {
<-start
s.Evict()
wg.Done()
}()
})
}
close(start) // start evicting in parallel
wg.Wait()

View File

@@ -124,30 +124,26 @@ func TestConcurrentAccess(t *testing.T) {
// Test concurrent Int() calls
for range numGoroutines {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
for range numOperations {
val := r.Int()
if val < 0 {
errors <- nil
}
}
}()
})
}
// Test concurrent Perm() calls
for range numGoroutines {
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
for range numOperations {
perm := r.Perm(5)
if len(perm) != 5 {
errors <- nil
}
}
}()
})
}
wg.Wait()

View File

@@ -64,8 +64,7 @@ func TestDoDupSuppress(t *testing.T) {
const n = 10
var wg sync.WaitGroup
for range n {
wg.Add(1)
go func() {
wg.Go(func() {
v, err := g.Do(1, fn)
if err != nil {
t.Errorf("Do error: %v", err)
@@ -73,8 +72,7 @@ func TestDoDupSuppress(t *testing.T) {
if v.(string) != "bar" {
t.Errorf("Got %q; want %q", v, "bar")
}
wg.Done()
}()
})
}
time.Sleep(100 * time.Millisecond) // let goroutines above block
c <- "bar"