From d7cb6465d9566cdafa0b0e409b331ddd0b97a8f8 Mon Sep 17 00:00:00 2001 From: Rick Date: Sat, 25 Oct 2025 21:13:42 +0800 Subject: [PATCH] fix: avoid big grpc response error --- pkg/testing/remote/grpc_store.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/testing/remote/grpc_store.go b/pkg/testing/remote/grpc_store.go index 8e25cf9ee..9c1fa3b2c 100644 --- a/pkg/testing/remote/grpc_store.go +++ b/pkg/testing/remote/grpc_store.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "math" "strconv" "time" @@ -29,6 +30,7 @@ import ( "github.com/linuxsuren/api-testing/pkg/testing" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) var ( @@ -51,7 +53,10 @@ func (g *gRPCLoader) NewInstance(store testing.Store) (writer testing.Writer, er address := store.Kind.URL var conn *grpc.ClientConn - if conn, err = grpc.Dial(address, grpc.WithInsecure()); err == nil { + + dialOption := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt))} + if conn, err = grpc.Dial(address, dialOption...); err == nil { writer = &gRPCLoader{ store: &store, ctx: WithStoreContext(context.Background(), &store),