Skip to content

Commit a2207e4

Browse files
committed
bump versions tests to 1.25 and 1.26. bump go.mod version to 1.25. update code to use modern features.
Signed-off-by: Jon Bodner <jbodner@buf.build>
1 parent 138e270 commit a2207e4

9 files changed

Lines changed: 21 additions & 29 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
matrix:
1919
go-version:
2020
- name: latest
21-
version: 1.25.x
21+
version: 1.26.x
2222
- name: previous
23-
version: 1.24.x
23+
version: 1.25.x
2424
steps:
2525
- name: Checkout Code
2626
uses: actions/checkout@v6
@@ -46,9 +46,9 @@ jobs:
4646
matrix:
4747
go-version:
4848
- name: latest
49-
version: 1.25.x
49+
version: 1.26.x
5050
- name: previous
51-
version: 1.24.x
51+
version: 1.25.x
5252
steps:
5353
- name: Checkout Code
5454
uses: actions/checkout@v6
@@ -71,6 +71,6 @@ jobs:
7171
uses: actions/setup-go@v6
7272
with:
7373
# only the latest
74-
go-version: 1.25.x
74+
go-version: 1.26.x
7575
- name: Run Slow Tests
7676
run: make slowtest

client_ext_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,7 @@ func testClientDeadlineBruteForceLoop(
721721

722722
var wg sync.WaitGroup
723723
for goroutine := range parallelism {
724-
wg.Add(1)
725-
go func() {
726-
defer wg.Done()
724+
wg.Go(func() {
727725
// We try a range of timeouts since the timing issue is sensitive
728726
// to execution environment (e.g. CPU, memory, and network speeds).
729727
// So the lower timeout values may be more likely to trigger an issue
@@ -794,7 +792,7 @@ func testClientDeadlineBruteForceLoop(
794792
}
795793
t.Logf("goroutine %d: repeating duration loop", goroutine)
796794
}
797-
}()
795+
})
798796
}
799797
wg.Wait()
800798
t.Logf("Issued %d RPCs.", rpcCount.Load())

connect_ext_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,9 +837,7 @@ func TestConcurrentStreams(t *testing.T) {
837837
var done, start sync.WaitGroup
838838
start.Add(1)
839839
for range runtime.GOMAXPROCS(0) * 8 {
840-
done.Add(1)
841-
go func() {
842-
defer done.Done()
840+
done.Go(func() {
843841
client := pingv1connect.NewPingServiceClient(server.Client(), server.URL())
844842
var total int64
845843
sum := client.CumSum(t.Context())
@@ -867,7 +865,7 @@ func TestConcurrentStreams(t *testing.T) {
867865
if err := sum.CloseResponse(); err != nil {
868866
t.Errorf("failed to close response: %v", err)
869867
}
870-
}()
868+
})
871869
}
872870
start.Done()
873871
done.Wait()

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module connectrpc.com/connect
22

3-
go 1.24.0
3+
go 1.25.0
44

55
retract (
66
v1.10.0 // module cache poisoned, use v1.10.1
77
v1.9.0 // module cache poisoned, use v1.9.1
88
)
99

1010
require (
11-
github.com/google/go-cmp v0.5.9
11+
github.com/google/go-cmp v0.7.0
1212
google.golang.org/protobuf v1.36.9
1313
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
2-
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
2+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
33
google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
44
google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=

internal/conformance/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module connectrpc.com/connect/internal/conformance
22

3-
go 1.24.0
3+
go 1.25.0
44

55
require connectrpc.com/conformance v1.0.5
66

@@ -35,7 +35,7 @@ require (
3535
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
3636
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
3737
google.golang.org/grpc v1.79.3 // indirect
38-
google.golang.org/protobuf v1.36.10 // indirect
38+
google.golang.org/protobuf v1.36.11 // indirect
3939
gopkg.in/yaml.v3 v3.0.1 // indirect
4040
nhooyr.io/websocket v1.8.6 // indirect
4141
)

internal/conformance/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
553553
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
554554
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
555555
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
556-
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
557-
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
556+
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
557+
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
558558
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
559559
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
560560
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

internal/memhttp/memhttp.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ func NewServer(handler http.Handler, opts ...Option) *Server {
6363
url: "http://" + listener.Addr().String(),
6464
cleanupTimeout: cfg.CleanupTimeout,
6565
}
66-
server.serverWG.Add(1)
67-
go func() {
68-
defer server.serverWG.Done()
66+
server.serverWG.Go(func() {
6967
server.serverErr = server.server.Serve(server.listener)
70-
}()
68+
})
7169
return server
7270
}
7371

internal/memhttp/memhttp_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ func TestServerTransport(t *testing.T) {
4949
t.Parallel()
5050
var wg sync.WaitGroup
5151
for range concurrency {
52-
wg.Add(1)
53-
go func() {
54-
defer wg.Done()
52+
wg.Go(func() {
5553
req, err := http.NewRequestWithContext(
5654
t.Context(),
5755
http.MethodGet,
@@ -66,7 +64,7 @@ func TestServerTransport(t *testing.T) {
6664
assert.Nil(t, err)
6765
assert.Nil(t, res.Body.Close())
6866
assert.Equal(t, string(body), greeting)
69-
}()
67+
})
7068
}
7169
wg.Wait()
7270
})

0 commit comments

Comments
 (0)