未验证 提交 8fb961a0 编写于 作者: G groot 提交者: GitHub

Add unittest for distributed querynode (#7996)

Signed-off-by: Nyhmo <yihua.mo@zilliz.com>
上级 0404e3c2
......@@ -14,7 +14,9 @@ package grpcquerynodeclient
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("queryNode.grpc.clientMaxSendSize")
Params.initClientMaxSendSize()
assert.Equal(t, Params.ClientMaxSendSize, grpcconfigs.DefaultClientMaxSendSize)
Params.Remove("queryNode.grpc.clientMaxRecvSize")
Params.initClientMaxRecvSize()
assert.Equal(t, Params.ClientMaxRecvSize, grpcconfigs.DefaultClientMaxRecvSize)
}
......@@ -16,7 +16,9 @@ import (
"go.uber.org/zap"
"github.com/milvus-io/milvus/internal/distributed/grpcconfigs"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/util/funcutil"
"github.com/stretchr/testify/assert"
)
......@@ -37,4 +39,15 @@ func TestParamTable(t *testing.T) {
log.Info("TestParamTable", zap.Int("ServerMaxSendSize", Params.ServerMaxSendSize))
log.Info("TestParamTable", zap.Int("ServerMaxRecvSize", Params.ServerMaxRecvSize))
Params.Remove("queryNode.grpc.ServerMaxSendSize")
Params.initServerMaxSendSize()
assert.Equal(t, Params.ServerMaxSendSize, grpcconfigs.DefaultServerMaxSendSize)
Params.Remove("queryNode.grpc.ServerMaxRecvSize")
Params.initServerMaxRecvSize()
assert.Equal(t, Params.ServerMaxRecvSize, grpcconfigs.DefaultServerMaxRecvSize)
Params.LoadFromEnv()
assert.Equal(t, Params.QueryNodeIP, funcutil.GetLocalIP())
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册