Establish a grpc connection When init queryNode client (#12236)

Signed-off-by: xige-16 <xi.ge@zilliz.com>
pull/12202/head
xige-16 2021-11-24 19:27:15 +08:00 committed by GitHub
parent 59d19384dc
commit 1a8e2e5e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,8 @@ func NewClient(ctx context.Context, addr string) (*Client, error) {
// Init initializes QueryNode's grpc client.
func (c *Client) Init() error {
Params.Init()
return nil
_, err := c.getGrpcClient()
return err
}
func (c *Client) connect(retryOptions ...retry.Option) error {

View File

@ -97,8 +97,7 @@ func Test_NewClient(t *testing.T) {
assert.Nil(t, err)
assert.NotNil(t, client)
err = client.Init()
assert.Nil(t, err)
Params.Init()
err = client.Start()
assert.Nil(t, err)