diff --git a/internal/distributed/rootcoord/client/paramtable_test.go b/internal/distributed/rootcoord/client/paramtable_test.go index b4f0900e83..7b95d43b1e 100644 --- a/internal/distributed/rootcoord/client/paramtable_test.go +++ b/internal/distributed/rootcoord/client/paramtable_test.go @@ -14,7 +14,9 @@ package grpcrootcoordclient import ( "testing" + "github.com/milvus-io/milvus/internal/distributed/grpcconfigs" "github.com/milvus-io/milvus/internal/log" + "github.com/stretchr/testify/assert" "go.uber.org/zap" ) @@ -23,4 +25,12 @@ func TestParamTable(t *testing.T) { log.Info("TestParamTable", zap.Int("ClientMaxSendSize", Params.ClientMaxSendSize)) log.Info("TestParamTable", zap.Int("ClientMaxRecvSize", Params.ClientMaxRecvSize)) + + Params.Remove("rootCoord.grpc.clientMaxSendSize") + Params.initClientMaxSendSize() + assert.Equal(t, Params.ClientMaxSendSize, grpcconfigs.DefaultClientMaxSendSize) + + Params.Remove("rootCoord.grpc.clientMaxRecvSize") + Params.initClientMaxRecvSize() + assert.Equal(t, Params.ClientMaxRecvSize, grpcconfigs.DefaultClientMaxRecvSize) } diff --git a/internal/distributed/rootcoord/param_table_test.go b/internal/distributed/rootcoord/param_table_test.go index c340ea54bc..41335a8d28 100644 --- a/internal/distributed/rootcoord/param_table_test.go +++ b/internal/distributed/rootcoord/param_table_test.go @@ -14,6 +14,7 @@ package grpcrootcoord import ( "testing" + "github.com/milvus-io/milvus/internal/distributed/grpcconfigs" "github.com/milvus-io/milvus/internal/log" "go.uber.org/zap" @@ -40,4 +41,12 @@ func TestParamTable(t *testing.T) { log.Info("TestParamTable", zap.Int("ServerMaxSendSize", Params.ServerMaxSendSize)) log.Info("TestParamTable", zap.Int("ServerMaxRecvSize", Params.ServerMaxRecvSize)) + + Params.Remove("rootCoord.grpc.ServerMaxSendSize") + Params.initServerMaxSendSize() + assert.Equal(t, Params.ServerMaxSendSize, grpcconfigs.DefaultServerMaxSendSize) + + Params.Remove("rootCoord.grpc.ServerMaxRecvSize") + Params.initServerMaxRecvSize() + assert.Equal(t, Params.ServerMaxRecvSize, grpcconfigs.DefaultServerMaxRecvSize) }