Bump google.golang.org/grpc from 1.66.2 to 1.80.0 (#556)

Migrate from deprecated grpc.DialContext/WithBlock to grpc.NewClient
with connectivity state polling in BlockingDial. Add passthrough:///
scheme prefix for bare addresses to preserve resolver behavior.
This commit is contained in:
Oleg Bonar
2026-06-05 18:02:39 +03:00
committed by GitHub
parent 2922de784b
commit cb68aaa7f5
4 changed files with 58 additions and 46 deletions

View File

@@ -74,10 +74,8 @@ func TestMain(m *testing.M) {
defer svrReflect.Stop()
// And a corresponding client
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
if ccReflect, err = grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", portReflect),
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()); err != nil {
if ccReflect, err = grpc.NewClient(fmt.Sprintf("passthrough:///127.0.0.1:%d", portReflect),
grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil {
panic(err)
}
defer ccReflect.Close()
@@ -99,10 +97,8 @@ func TestMain(m *testing.M) {
defer svrProtoset.Stop()
// And a corresponding client
ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
if ccNoReflect, err = grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", portProtoset),
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()); err != nil {
if ccNoReflect, err = grpc.NewClient(fmt.Sprintf("passthrough:///127.0.0.1:%d", portProtoset),
grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil {
panic(err)
}
defer ccNoReflect.Close()