Repository: milvus-io/milvus-sdk-go
Pull request #397 (2023-02-10 10:31:59)

Support get bulk insert progress
/kind improvement
related:#393

Signed-off-by: wayblink <anyang.wang@zilliz.com>

sre-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/397#" title="Author self-approved">wayblink</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **sunby** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @sunby` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=milvus-io%2Fmilvus-sdk-go).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/v2.2.x/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["sunby"]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/397?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) Report
> Merging [#397](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/397?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (274e1f5) into [v2.2.x](https://codecov.io/gh/milvus-io/milvus-sdk-go/commit/5bdf7c3cda2e3caa4cee557435ad07fb958b691f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (5bdf7c3) will **decrease** coverage by `0.17%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/397/graphs/tree.svg?width=650&height=150&src=pr&token=WJK43PV390&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/397?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

```diff
@@            Coverage Diff             @@
##           v2.2.x     #397      +/-   ##
==========================================
- Coverage   83.67%   83.50%   -0.17%     
==========================================
  Files          29       30       +1     
  Lines        3038     3044       +6     
==========================================
  Hits         2542     2542              
- Misses        404      410       +6     
  Partials       92       92              
```


| [Impacted Files](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/397?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | Coverage Δ | |
|---|---|---|
| [entity/bulkinsert.go](https://codecov.io/gh/milvus-io/milvus-sdk-go/pull/397?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-ZW50aXR5L2J1bGtpbnNlcnQuZ28=) | `0.00% <0.00%> (ø)` | |

sre-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/397#pullrequestreview-1292897386" title="LGTM">congqixia</a>*, *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/397#" title="Author self-approved">wayblink</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=milvus-io%2Fmilvus-sdk-go).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/v2.2.x/OWNERS)~~ [congqixia]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/.gitignore b/.gitignore
index 9391cb9..6a433f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,6 @@
 
 # Dependency directories (remove the comment below to include it)
 # vendor/
+
+# mockery and lint tools
+bin
diff --git a/Makefile b/Makefile
index 96ff5eb..866bf5d 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ PWD 	:= $(shell pwd)
 GOPATH 	:= $(shell $(GO) env GOPATH)
 PROTOC	:= $(shell which protoc)
 PROTOC_VER := $(shell protoc --version)
+INSTALL_PATH := $(PWD)/bin
 
 all: check-protoc-version 
 
@@ -24,6 +25,11 @@ else
 	@echo "using $(shell which protoc)"
 endif
 
+install-tool:
+	@mkdir -p $(INSTALL_PATH)
+	@$(INSTALL_PATH)/golangci-lint --version 2>&1 1>/dev/null || (echo "Installing golangci-lint into ./bin/" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(INSTALL_PATH) v1.46.2)
+	@$(INSTALL_PATH)/mockery --version 2>&1 1>/dev/null || (echo "Installing mockery v2.16.0 to ./bin/" && GOBIN=$(INSTALL_PATH)/ go install github.com/vektra/mockery/v2@v2.16.0)
+
 check-protoc-version: check-protoc
 	@(env bash $(PWD)/scripts/check_protoc_version.sh)
 
@@ -31,13 +37,16 @@ generate-proto: check-protoc-version
 	@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && go get github.com/golang/protobuf/protoc-gen-go@v1.5.2)
 	@(env bash $(PWD)/scripts/proto_gen_go.sh)
 
+generate-mockery: install-tool
+	@echo "generating mockery milvus service server"
+	@$(INSTALL_PATH)/mockery --srcpkg=github.com/milvus-io/milvus-proto/go-api/milvuspb --name=MilvusServiceServer --output=mocks --outpkg=mocks --with-expecter
+
 static-check:
 	@echo "Running $@ check:"
-	@golangci-lint cache clean
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./entity/...
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./client/...
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./internal/...
-	@golangci-lint run --timeout=30m --config ./.golangci.yml ./tests/...
+	@$(INSTALL_PATH)/golangci-lint cache clean
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./entity/...
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./client/...
+	@$(INSTALL_PATH)/golangci-lint run --timeout=30m --config ./.golangci.yml ./internal/...
 
 test-go:
 	@echo "Running unit tests:"
diff --git a/client/client.go b/client/client.go
index f9c0ff3..3ba4605 100644
--- a/client/client.go
+++ b/client/client.go
@@ -170,6 +170,19 @@ type Client interface {
 	// GetLoadState get the collection or partitions load state
 	GetLoadState(ctx context.Context, collectionName string, partitionNames []string) (entity.LoadState, error)
 
+	// ListResourceGroups returns list of resource group names in current Milvus instance.
+	ListResourceGroups(ctx context.Context) ([]string, error)
+	// CreateResourceGroup creates a resource group with provided name.
+	CreateResourceGroup(ctx context.Context, rgName string) error
+	// DescribeResourceGroup returns resource groups information.
+	DescribeResourceGroup(ctx context.Context, rgName string) (*entity.ResourceGroup, error)
+	// DropResourceGroup drops the resource group with provided name.
+	DropResourceGroup(ctx context.Context, rgName string) error
+	// TransferNode transfers querynodes between resource groups.
+	TransferNode(ctx context.Context, sourceRg, targetRg string, nodesNum int32) error
+	// TransferReplica transfer collection replicas between source,target resource group.
+	TransferReplica(ctx context.Context, sourceRg, targetRg string, collectionName string, replicaNum int64) error
+
 	// GetVersion get milvus version
 	GetVersion(ctx context.Context) (string, error)
 }
diff --git a/client/client_grpc_rg.go b/client/client_grpc_rg.go
new file mode 100644
index 0000000..cb4d99f
--- /dev/null
+++ b/client/client_grpc_rg.go
@@ -0,0 +1,142 @@
+// Copyright (C) 2019-2021 Zilliz. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software distributed under the License
+// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+// or implied. See the License for the specific language governing permissions and limitations under the License.
+
+package client
+
+import (
+	"context"
+
+	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	"github.com/milvus-io/milvus-sdk-go/v2/entity"
+)
+
+// ListResourceGroups returns list of resource group names in current Milvus instance.
+func (c *GrpcClient) ListResourceGroups(ctx context.Context) ([]string, error) {
+	if c.Service == nil {
+		return nil, ErrClientNotReady
+	}
+
+	req := &server.ListResourceGroupsRequest{}
+
+	resp, err := c.Service.ListResourceGroups(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err = handleRespStatus(resp.GetStatus()); err != nil {
+		return nil, err
+	}
+
+	return resp.GetResourceGroups(), nil
+}
+
+// CreateResourceGroup creates a resource group with provided name.
+func (c *GrpcClient) CreateResourceGroup(ctx context.Context, rgName string) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.CreateResourceGroupRequest{
+		ResourceGroup: rgName,
+	}
+
+	resp, err := c.Service.CreateResourceGroup(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// DescribeResourceGroup returns resource groups information.
+func (c *GrpcClient) DescribeResourceGroup(ctx context.Context, rgName string) (*entity.ResourceGroup, error) {
+	if c.Service == nil {
+		return nil, ErrClientNotReady
+	}
+
+	req := &server.DescribeResourceGroupRequest{
+		ResourceGroup: rgName,
+	}
+
+	resp, err := c.Service.DescribeResourceGroup(ctx, req)
+	if err != nil {
+		return nil, err
+	}
+	if err = handleRespStatus(resp.GetStatus()); err != nil {
+		return nil, err
+	}
+
+	rg := resp.GetResourceGroup()
+	result := &entity.ResourceGroup{
+		Name:                 rg.GetName(),
+		Capacity:             rg.GetCapacity(),
+		AvailableNodesNumber: rg.GetNumAvailableNode(),
+		LoadedReplica:        rg.GetNumLoadedReplica(),
+		OutgoingNodeNum:      rg.GetNumOutgoingNode(),
+		IncomingNodeNum:      rg.GetNumIncomingNode(),
+	}
+
+	return result, nil
+}
+
+// DropResourceGroup drops the resource group with provided name.
+func (c *GrpcClient) DropResourceGroup(ctx context.Context, rgName string) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.DropResourceGroupRequest{
+		ResourceGroup: rgName,
+	}
+
+	resp, err := c.Service.DropResourceGroup(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// TransferNode transfers querynodes between resource groups.
+func (c *GrpcClient) TransferNode(ctx context.Context, sourceRg, targetRg string, nodesNum int32) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.TransferNodeRequest{
+		SourceResourceGroup: sourceRg,
+		TargetResourceGroup: targetRg,
+		NumNode:             nodesNum,
+	}
+
+	resp, err := c.Service.TransferNode(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
+
+// TransferReplica transfer collection replicas between source,target resource group.
+func (c *GrpcClient) TransferReplica(ctx context.Context, sourceRg, targetRg string, collectionName string, replicaNum int64) error {
+	if c.Service == nil {
+		return ErrClientNotReady
+	}
+
+	req := &server.TransferReplicaRequest{
+		SourceResourceGroup: sourceRg,
+		TargetResourceGroup: targetRg,
+		CollectionName:      collectionName,
+		NumReplica:          replicaNum,
+	}
+
+	resp, err := c.Service.TransferReplica(ctx, req)
+	if err != nil {
+		return err
+	}
+	return handleRespStatus(resp)
+}
diff --git a/client/client_mock.go b/client/client_mock_test.go
similarity index 89%
rename from client/client_mock.go
rename to client/client_mock_test.go
index 283e35a..a8d63d9 100644
--- a/client/client_mock.go
+++ b/client/client_mock_test.go
@@ -3,13 +3,76 @@ package client
 import (
 	"context"
 	"errors"
+	"net"
 	"sync"
 
 	"github.com/golang/protobuf/proto"
 	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
 	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+	"github.com/milvus-io/milvus-sdk-go/v2/mocks"
+	"github.com/stretchr/testify/suite"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/test/bufconn"
 )
 
+type MockSuiteBase struct {
+	suite.Suite
+
+	lis  *bufconn.Listener
+	svr  *grpc.Server
+	mock *mocks.MilvusServiceServer
+
+	client Client
+}
+
+func (s *MockSuiteBase) SetupSuite() {
+	s.lis = bufconn.Listen(bufSize)
+	s.svr = grpc.NewServer()
+
+	s.mock = &mocks.MilvusServiceServer{}
+
+	server.RegisterMilvusServiceServer(s.svr, s.mock)
+
+	go func() {
+		s.T().Log("start mock server")
+		if err := s.svr.Serve(s.lis); err != nil {
+			s.Fail("failed to server mock server", err.Error())
+		}
+	}()
+}
+
+func (s *MockSuiteBase) TearDownSuite() {
+	s.svr.Stop()
+	s.lis.Close()
+}
+
+func (s *MockSuiteBase) mockDialer(context.Context, string) (net.Conn, error) {
+	return s.lis.Dial()
+}
+
+func (s *MockSuiteBase) SetupTest() {
+	c, err := NewGrpcClient(context.Background(), "bufnet2",
+		grpc.WithBlock(),
+		grpc.WithInsecure(),
+		grpc.WithContextDialer(s.mockDialer),
+	)
+	s.Require().NoError(err)
+
+	s.client = c
+}
+
+func (s *MockSuiteBase) TearDownTest() {
+	s.client.Close()
+	s.client = nil
+}
+
+func (s *MockSuiteBase) resetMock() {
+	if s.mock != nil {
+		s.mock.Calls = nil
+		s.mock.ExpectedCalls = nil
+	}
+}
+
 // ref https://stackoverflow.com/questions/42102496/testing-a-grpc-service
 
 var (
@@ -63,7 +126,6 @@ const (
 	MGetFlushState ServiceMethod = 604
 	MDelete        ServiceMethod = 605
 	MQuery         ServiceMethod = 606
-	MUpsert        ServiceMethod = 607
 
 	MManualCompaction            ServiceMethod = 700
 	MGetCompactionState          ServiceMethod = 701
@@ -642,6 +704,34 @@ func (m *MockServer) CheckHealth(ctx context.Context, req *server.CheckHealthReq
 	return &server.CheckHealthResponse{Status: s}, err
 }
 
+func (m *MockServer) CreateResourceGroup(_ context.Context, _ *server.CreateResourceGroupRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) DropResourceGroup(_ context.Context, _ *server.DropResourceGroupRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) TransferNode(_ context.Context, _ *server.TransferNodeRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) TransferReplica(_ context.Context, _ *server.TransferReplicaRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) ListResourceGroups(_ context.Context, _ *server.ListResourceGroupsRequest) (*server.ListResourceGroupsResponse, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) DescribeResourceGroup(_ context.Context, _ *server.DescribeResourceGroupRequest) (*server.DescribeResourceGroupResponse, error) {
+	panic("not implemented") // TODO: Implement
+}
+
+func (m *MockServer) RenameCollection(_ context.Context, _ *server.RenameCollectionRequest) (*common.Status, error) {
+	panic("not implemented") // TODO: Implement
+}
+
 func SuccessStatus() (*common.Status, error) {
 	return &common.Status{ErrorCode: common.ErrorCode_Success}, nil
 }
@@ -656,13 +746,3 @@ func BadStatus() (*common.Status, error) {
 		Reason:    "fail reason",
 	}, nil
 }
-
-func (m *MockServer) Upsert(ctx context.Context, req *server.UpsertRequest) (*server.MutationResult, error) {
-	f := m.GetInjection(MUpsert)
-	if f != nil {
-		r, err := f(ctx, req)
-		return r.(*server.MutationResult), err
-	}
-	s, err := SuccessStatus()
-	return &server.MutationResult{Status: s}, err
-}
diff --git a/entity/bulkinsert.go b/entity/bulkinsert.go
index 479fb44..a807377 100644
--- a/entity/bulkinsert.go
+++ b/entity/bulkinsert.go
@@ -1,5 +1,7 @@
 package entity
 
+import "strconv"
+
 type BulkInsertState int32
 
 const (
@@ -9,6 +11,8 @@ const (
 	BulkInsertPersisted        BulkInsertState = 5 // all data files have been parsed and data already persisted
 	BulkInsertCompleted        BulkInsertState = 6 // all indexes are successfully built and segments are able to be compacted as normal.
 	BulkInsertFailedAndCleaned BulkInsertState = 7 // the task failed and all segments it generated are cleaned up.
+
+	ImportProgress = "progress_percent"
 )
 
 type BulkInsertTaskState struct {
@@ -21,3 +25,14 @@ type BulkInsertTaskState struct {
 	SegmentIDs   []int64           // a list of segment IDs created by the import task.
 	CreateTs     int64             //timestamp when the import task is created.
 }
+
+func (state BulkInsertTaskState) Progress() int {
+	if val, ok := state.Infos[ImportProgress]; ok {
+		progress, err := strconv.Atoi(val)
+		if err != nil {
+			return 0
+		}
+		return progress
+	}
+	return 0
+}
diff --git a/entity/resource_group.go b/entity/resource_group.go
new file mode 100644
index 0000000..f090f2e
--- /dev/null
+++ b/entity/resource_group.go
@@ -0,0 +1,11 @@
+package entity
+
+//ResourceGroup information model struct.
+type ResourceGroup struct {
+	Name                 string
+	Capacity             int32
+	AvailableNodesNumber int32
+	LoadedReplica        map[string]int32
+	OutgoingNodeNum      map[string]int32
+	IncomingNodeNum      map[string]int32
+}
diff --git a/go.mod b/go.mod
index 0e9f1fd..1cc89da 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.17
 require (
 	github.com/golang/protobuf v1.5.2
 	github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
-	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729
+	github.com/milvus-io/milvus-proto/go-api v0.0.0-20230301092744-7efc6eec15fd
 	github.com/stretchr/testify v1.8.1
 	google.golang.org/grpc v1.48.0
 	google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f
@@ -15,7 +15,9 @@ require (
 require (
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/samber/lo v1.37.0 // indirect
 	github.com/stretchr/objx v0.5.0 // indirect
+	golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
 	golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
 	golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
 	golang.org/x/text v0.3.7 // indirect
diff --git a/go.sum b/go.sum
index fbc7caf..f228e0f 100644
--- a/go.sum
+++ b/go.sum
@@ -61,12 +61,18 @@ github.com/milvus-io/milvus-proto/go-api v0.0.0-20221019080323-84e9fa2f9e45 h1:Q
 github.com/milvus-io/milvus-proto/go-api v0.0.0-20221019080323-84e9fa2f9e45/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
 github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729 h1:hsb1ifdNe3qlXi1YY5dWPPzWMNZmnqe5uunYPYK3gd0=
 github.com/milvus-io/milvus-proto/go-api v0.0.0-20230105121931-9f9303dcc729/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230301092744-7efc6eec15fd h1:9ilgTEqZSdEPbJKSrRGB1TIHTaF7DqVDIwn8/azcaBk=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230301092744-7efc6eec15fd/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572 h1:QOimLfT1VwjH9jUkq2SN3uT/WGfgcD4pYBoFOGUMwjM=
+github.com/milvus-io/milvus-proto/go-api v0.0.0-20230303054144-16f081962572/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
+github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -94,6 +100,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
+golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
 golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
diff --git a/internal/milvus-proto b/internal/milvus-proto
index 505fbe7..7efc6ee 160000
--- a/internal/milvus-proto
+++ b/internal/milvus-proto
@@ -1,1 +1,1 @@
-Subproject commit 505fbe76bf1cf42c5e306491ae941e56fadea89f
+Subproject commit 7efc6eec15fd536e5955019e96e7b62115b882a3
diff --git a/mocks/MilvusServiceServer.go b/mocks/MilvusServiceServer.go
index f47261e..3e8195f 100644
--- a/mocks/MilvusServiceServer.go
+++ b/mocks/MilvusServiceServer.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.15.0. DO NOT EDIT.
+// Code generated by mockery v2.16.0. DO NOT EDIT.
 
 package mocks
 
@@ -54,8 +54,8 @@ type MilvusServiceServer_AlterAlias_Call struct {
 }
 
 // AlterAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AlterAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AlterAliasRequest
 func (_e *MilvusServiceServer_Expecter) AlterAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterAlias_Call {
 	return &MilvusServiceServer_AlterAlias_Call{Call: _e.mock.On("AlterAlias", _a0, _a1)}
 }
@@ -101,8 +101,8 @@ type MilvusServiceServer_AlterCollection_Call struct {
 }
 
 // AlterCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.AlterCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.AlterCollectionRequest
 func (_e *MilvusServiceServer_Expecter) AlterCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_AlterCollection_Call {
 	return &MilvusServiceServer_AlterCollection_Call{Call: _e.mock.On("AlterCollection", _a0, _a1)}
 }
@@ -148,8 +148,8 @@ type MilvusServiceServer_CalcDistance_Call struct {
 }
 
 // CalcDistance is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CalcDistanceRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CalcDistanceRequest
 func (_e *MilvusServiceServer_Expecter) CalcDistance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CalcDistance_Call {
 	return &MilvusServiceServer_CalcDistance_Call{Call: _e.mock.On("CalcDistance", _a0, _a1)}
 }
@@ -195,8 +195,8 @@ type MilvusServiceServer_CheckHealth_Call struct {
 }
 
 // CheckHealth is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CheckHealthRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CheckHealthRequest
 func (_e *MilvusServiceServer_Expecter) CheckHealth(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CheckHealth_Call {
 	return &MilvusServiceServer_CheckHealth_Call{Call: _e.mock.On("CheckHealth", _a0, _a1)}
 }
@@ -242,8 +242,8 @@ type MilvusServiceServer_CreateAlias_Call struct {
 }
 
 // CreateAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateAliasRequest
 func (_e *MilvusServiceServer_Expecter) CreateAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateAlias_Call {
 	return &MilvusServiceServer_CreateAlias_Call{Call: _e.mock.On("CreateAlias", _a0, _a1)}
 }
@@ -289,8 +289,8 @@ type MilvusServiceServer_CreateCollection_Call struct {
 }
 
 // CreateCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateCollectionRequest
 func (_e *MilvusServiceServer_Expecter) CreateCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCollection_Call {
 	return &MilvusServiceServer_CreateCollection_Call{Call: _e.mock.On("CreateCollection", _a0, _a1)}
 }
@@ -336,8 +336,8 @@ type MilvusServiceServer_CreateCredential_Call struct {
 }
 
 // CreateCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateCredentialRequest
 func (_e *MilvusServiceServer_Expecter) CreateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateCredential_Call {
 	return &MilvusServiceServer_CreateCredential_Call{Call: _e.mock.On("CreateCredential", _a0, _a1)}
 }
@@ -383,8 +383,8 @@ type MilvusServiceServer_CreateIndex_Call struct {
 }
 
 // CreateIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateIndexRequest
 func (_e *MilvusServiceServer_Expecter) CreateIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateIndex_Call {
 	return &MilvusServiceServer_CreateIndex_Call{Call: _e.mock.On("CreateIndex", _a0, _a1)}
 }
@@ -430,8 +430,8 @@ type MilvusServiceServer_CreatePartition_Call struct {
 }
 
 // CreatePartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreatePartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreatePartitionRequest
 func (_e *MilvusServiceServer_Expecter) CreatePartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreatePartition_Call {
 	return &MilvusServiceServer_CreatePartition_Call{Call: _e.mock.On("CreatePartition", _a0, _a1)}
 }
@@ -448,6 +448,53 @@ func (_c *MilvusServiceServer_CreatePartition_Call) Return(_a0 *commonpb.Status,
 	return _c
 }
 
+// CreateResourceGroup provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) CreateResourceGroup(_a0 context.Context, _a1 *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateResourceGroupRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_CreateResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateResourceGroup'
+type MilvusServiceServer_CreateResourceGroup_Call struct {
+	*mock.Call
+}
+
+// CreateResourceGroup is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateResourceGroupRequest
+func (_e *MilvusServiceServer_Expecter) CreateResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateResourceGroup_Call {
+	return &MilvusServiceServer_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_CreateResourceGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.CreateResourceGroupRequest)) *MilvusServiceServer_CreateResourceGroup_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.CreateResourceGroupRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_CreateResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_CreateResourceGroup_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // CreateRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) CreateRole(_a0 context.Context, _a1 *milvuspb.CreateRoleRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -477,8 +524,8 @@ type MilvusServiceServer_CreateRole_Call struct {
 }
 
 // CreateRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.CreateRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.CreateRoleRequest
 func (_e *MilvusServiceServer_Expecter) CreateRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_CreateRole_Call {
 	return &MilvusServiceServer_CreateRole_Call{Call: _e.mock.On("CreateRole", _a0, _a1)}
 }
@@ -524,8 +571,8 @@ type MilvusServiceServer_Delete_Call struct {
 }
 
 // Delete is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DeleteRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DeleteRequest
 func (_e *MilvusServiceServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Delete_Call {
 	return &MilvusServiceServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)}
 }
@@ -571,8 +618,8 @@ type MilvusServiceServer_DeleteCredential_Call struct {
 }
 
 // DeleteCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DeleteCredentialRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DeleteCredentialRequest
 func (_e *MilvusServiceServer_Expecter) DeleteCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DeleteCredential_Call {
 	return &MilvusServiceServer_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", _a0, _a1)}
 }
@@ -618,8 +665,8 @@ type MilvusServiceServer_DescribeCollection_Call struct {
 }
 
 // DescribeCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeCollectionRequest
 func (_e *MilvusServiceServer_Expecter) DescribeCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeCollection_Call {
 	return &MilvusServiceServer_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", _a0, _a1)}
 }
@@ -665,8 +712,8 @@ type MilvusServiceServer_DescribeIndex_Call struct {
 }
 
 // DescribeIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DescribeIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeIndexRequest
 func (_e *MilvusServiceServer_Expecter) DescribeIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeIndex_Call {
 	return &MilvusServiceServer_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", _a0, _a1)}
 }
@@ -683,6 +730,53 @@ func (_c *MilvusServiceServer_DescribeIndex_Call) Return(_a0 *milvuspb.DescribeI
 	return _c
 }
 
+// DescribeResourceGroup provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) DescribeResourceGroup(_a0 context.Context, _a1 *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *milvuspb.DescribeResourceGroupResponse
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) *milvuspb.DescribeResourceGroupResponse); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*milvuspb.DescribeResourceGroupResponse)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_DescribeResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeResourceGroup'
+type MilvusServiceServer_DescribeResourceGroup_Call struct {
+	*mock.Call
+}
+
+// DescribeResourceGroup is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DescribeResourceGroupRequest
+func (_e *MilvusServiceServer_Expecter) DescribeResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DescribeResourceGroup_Call {
+	return &MilvusServiceServer_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_DescribeResourceGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DescribeResourceGroupRequest)) *MilvusServiceServer_DescribeResourceGroup_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.DescribeResourceGroupRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_DescribeResourceGroup_Call) Return(_a0 *milvuspb.DescribeResourceGroupResponse, _a1 error) *MilvusServiceServer_DescribeResourceGroup_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // DropAlias provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropAlias(_a0 context.Context, _a1 *milvuspb.DropAliasRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -712,8 +806,8 @@ type MilvusServiceServer_DropAlias_Call struct {
 }
 
 // DropAlias is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropAliasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropAliasRequest
 func (_e *MilvusServiceServer_Expecter) DropAlias(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropAlias_Call {
 	return &MilvusServiceServer_DropAlias_Call{Call: _e.mock.On("DropAlias", _a0, _a1)}
 }
@@ -759,8 +853,8 @@ type MilvusServiceServer_DropCollection_Call struct {
 }
 
 // DropCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropCollectionRequest
 func (_e *MilvusServiceServer_Expecter) DropCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropCollection_Call {
 	return &MilvusServiceServer_DropCollection_Call{Call: _e.mock.On("DropCollection", _a0, _a1)}
 }
@@ -806,8 +900,8 @@ type MilvusServiceServer_DropIndex_Call struct {
 }
 
 // DropIndex is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropIndexRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropIndexRequest
 func (_e *MilvusServiceServer_Expecter) DropIndex(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropIndex_Call {
 	return &MilvusServiceServer_DropIndex_Call{Call: _e.mock.On("DropIndex", _a0, _a1)}
 }
@@ -853,8 +947,8 @@ type MilvusServiceServer_DropPartition_Call struct {
 }
 
 // DropPartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropPartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropPartitionRequest
 func (_e *MilvusServiceServer_Expecter) DropPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropPartition_Call {
 	return &MilvusServiceServer_DropPartition_Call{Call: _e.mock.On("DropPartition", _a0, _a1)}
 }
@@ -871,6 +965,53 @@ func (_c *MilvusServiceServer_DropPartition_Call) Return(_a0 *commonpb.Status, _
 	return _c
 }
 
+// DropResourceGroup provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) DropResourceGroup(_a0 context.Context, _a1 *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropResourceGroupRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_DropResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropResourceGroup'
+type MilvusServiceServer_DropResourceGroup_Call struct {
+	*mock.Call
+}
+
+// DropResourceGroup is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropResourceGroupRequest
+func (_e *MilvusServiceServer_Expecter) DropResourceGroup(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropResourceGroup_Call {
+	return &MilvusServiceServer_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_DropResourceGroup_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.DropResourceGroupRequest)) *MilvusServiceServer_DropResourceGroup_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.DropResourceGroupRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_DropResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_DropResourceGroup_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // DropRole provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) DropRole(_a0 context.Context, _a1 *milvuspb.DropRoleRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -900,8 +1041,8 @@ type MilvusServiceServer_DropRole_Call struct {
 }
 
 // DropRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DropRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DropRoleRequest
 func (_e *MilvusServiceServer_Expecter) DropRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_DropRole_Call {
 	return &MilvusServiceServer_DropRole_Call{Call: _e.mock.On("DropRole", _a0, _a1)}
 }
@@ -947,8 +1088,8 @@ type MilvusServiceServer_Dummy_Call struct {
 }
 
 // Dummy is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.DummyRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.DummyRequest
 func (_e *MilvusServiceServer_Expecter) Dummy(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Dummy_Call {
 	return &MilvusServiceServer_Dummy_Call{Call: _e.mock.On("Dummy", _a0, _a1)}
 }
@@ -994,8 +1135,8 @@ type MilvusServiceServer_Flush_Call struct {
 }
 
 // Flush is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.FlushRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.FlushRequest
 func (_e *MilvusServiceServer_Expecter) Flush(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Flush_Call {
 	return &MilvusServiceServer_Flush_Call{Call: _e.mock.On("Flush", _a0, _a1)}
 }
@@ -1041,8 +1182,8 @@ type MilvusServiceServer_GetCollectionStatistics_Call struct {
 }
 
 // GetCollectionStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCollectionStatisticsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCollectionStatisticsRequest
 func (_e *MilvusServiceServer_Expecter) GetCollectionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCollectionStatistics_Call {
 	return &MilvusServiceServer_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", _a0, _a1)}
 }
@@ -1088,8 +1229,8 @@ type MilvusServiceServer_GetCompactionState_Call struct {
 }
 
 // GetCompactionState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCompactionStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCompactionStateRequest
 func (_e *MilvusServiceServer_Expecter) GetCompactionState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionState_Call {
 	return &MilvusServiceServer_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", _a0, _a1)}
 }
@@ -1135,8 +1276,8 @@ type MilvusServiceServer_GetCompactionStateWithPlans_Call struct {
 }
 
 // GetCompactionStateWithPlans is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetCompactionPlansRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetCompactionPlansRequest
 func (_e *MilvusServiceServer_Expecter) GetCompactionStateWithPlans(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetCompactionStateWithPlans_Call {
 	return &MilvusServiceServer_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", _a0, _a1)}
 }
@@ -1182,8 +1323,8 @@ type MilvusServiceServer_GetComponentStates_Call struct {
 }
 
 // GetComponentStates is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetComponentStatesRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetComponentStatesRequest
 func (_e *MilvusServiceServer_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetComponentStates_Call {
 	return &MilvusServiceServer_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)}
 }
@@ -1229,8 +1370,8 @@ type MilvusServiceServer_GetFlushState_Call struct {
 }
 
 // GetFlushState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetFlushStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetFlushStateRequest
 func (_e *MilvusServiceServer_Expecter) GetFlushState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetFlushState_Call {
 	return &MilvusServiceServer_GetFlushState_Call{Call: _e.mock.On("GetFlushState", _a0, _a1)}
 }
@@ -1276,8 +1417,8 @@ type MilvusServiceServer_GetImportState_Call struct {
 }
 
 // GetImportState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetImportStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetImportStateRequest
 func (_e *MilvusServiceServer_Expecter) GetImportState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetImportState_Call {
 	return &MilvusServiceServer_GetImportState_Call{Call: _e.mock.On("GetImportState", _a0, _a1)}
 }
@@ -1323,8 +1464,8 @@ type MilvusServiceServer_GetIndexBuildProgress_Call struct {
 }
 
 // GetIndexBuildProgress is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexBuildProgressRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexBuildProgressRequest
 func (_e *MilvusServiceServer_Expecter) GetIndexBuildProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexBuildProgress_Call {
 	return &MilvusServiceServer_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", _a0, _a1)}
 }
@@ -1370,8 +1511,8 @@ type MilvusServiceServer_GetIndexState_Call struct {
 }
 
 // GetIndexState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetIndexStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetIndexStateRequest
 func (_e *MilvusServiceServer_Expecter) GetIndexState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetIndexState_Call {
 	return &MilvusServiceServer_GetIndexState_Call{Call: _e.mock.On("GetIndexState", _a0, _a1)}
 }
@@ -1417,8 +1558,8 @@ type MilvusServiceServer_GetLoadState_Call struct {
 }
 
 // GetLoadState is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetLoadStateRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetLoadStateRequest
 func (_e *MilvusServiceServer_Expecter) GetLoadState(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadState_Call {
 	return &MilvusServiceServer_GetLoadState_Call{Call: _e.mock.On("GetLoadState", _a0, _a1)}
 }
@@ -1464,8 +1605,8 @@ type MilvusServiceServer_GetLoadingProgress_Call struct {
 }
 
 // GetLoadingProgress is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetLoadingProgressRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetLoadingProgressRequest
 func (_e *MilvusServiceServer_Expecter) GetLoadingProgress(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetLoadingProgress_Call {
 	return &MilvusServiceServer_GetLoadingProgress_Call{Call: _e.mock.On("GetLoadingProgress", _a0, _a1)}
 }
@@ -1511,8 +1652,8 @@ type MilvusServiceServer_GetMetrics_Call struct {
 }
 
 // GetMetrics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetMetricsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetMetricsRequest
 func (_e *MilvusServiceServer_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetMetrics_Call {
 	return &MilvusServiceServer_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
 }
@@ -1558,8 +1699,8 @@ type MilvusServiceServer_GetPartitionStatistics_Call struct {
 }
 
 // GetPartitionStatistics is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetPartitionStatisticsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetPartitionStatisticsRequest
 func (_e *MilvusServiceServer_Expecter) GetPartitionStatistics(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPartitionStatistics_Call {
 	return &MilvusServiceServer_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", _a0, _a1)}
 }
@@ -1605,8 +1746,8 @@ type MilvusServiceServer_GetPersistentSegmentInfo_Call struct {
 }
 
 // GetPersistentSegmentInfo is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetPersistentSegmentInfoRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetPersistentSegmentInfoRequest
 func (_e *MilvusServiceServer_Expecter) GetPersistentSegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetPersistentSegmentInfo_Call {
 	return &MilvusServiceServer_GetPersistentSegmentInfo_Call{Call: _e.mock.On("GetPersistentSegmentInfo", _a0, _a1)}
 }
@@ -1652,8 +1793,8 @@ type MilvusServiceServer_GetQuerySegmentInfo_Call struct {
 }
 
 // GetQuerySegmentInfo is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetQuerySegmentInfoRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetQuerySegmentInfoRequest
 func (_e *MilvusServiceServer_Expecter) GetQuerySegmentInfo(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetQuerySegmentInfo_Call {
 	return &MilvusServiceServer_GetQuerySegmentInfo_Call{Call: _e.mock.On("GetQuerySegmentInfo", _a0, _a1)}
 }
@@ -1699,8 +1840,8 @@ type MilvusServiceServer_GetReplicas_Call struct {
 }
 
 // GetReplicas is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetReplicasRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetReplicasRequest
 func (_e *MilvusServiceServer_Expecter) GetReplicas(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetReplicas_Call {
 	return &MilvusServiceServer_GetReplicas_Call{Call: _e.mock.On("GetReplicas", _a0, _a1)}
 }
@@ -1746,8 +1887,8 @@ type MilvusServiceServer_GetVersion_Call struct {
 }
 
 // GetVersion is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.GetVersionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.GetVersionRequest
 func (_e *MilvusServiceServer_Expecter) GetVersion(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_GetVersion_Call {
 	return &MilvusServiceServer_GetVersion_Call{Call: _e.mock.On("GetVersion", _a0, _a1)}
 }
@@ -1793,8 +1934,8 @@ type MilvusServiceServer_HasCollection_Call struct {
 }
 
 // HasCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.HasCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.HasCollectionRequest
 func (_e *MilvusServiceServer_Expecter) HasCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasCollection_Call {
 	return &MilvusServiceServer_HasCollection_Call{Call: _e.mock.On("HasCollection", _a0, _a1)}
 }
@@ -1840,8 +1981,8 @@ type MilvusServiceServer_HasPartition_Call struct {
 }
 
 // HasPartition is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.HasPartitionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.HasPartitionRequest
 func (_e *MilvusServiceServer_Expecter) HasPartition(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_HasPartition_Call {
 	return &MilvusServiceServer_HasPartition_Call{Call: _e.mock.On("HasPartition", _a0, _a1)}
 }
@@ -1887,8 +2028,8 @@ type MilvusServiceServer_Import_Call struct {
 }
 
 // Import is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ImportRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ImportRequest
 func (_e *MilvusServiceServer_Expecter) Import(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Import_Call {
 	return &MilvusServiceServer_Import_Call{Call: _e.mock.On("Import", _a0, _a1)}
 }
@@ -1934,8 +2075,8 @@ type MilvusServiceServer_Insert_Call struct {
 }
 
 // Insert is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.InsertRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.InsertRequest
 func (_e *MilvusServiceServer_Expecter) Insert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Insert_Call {
 	return &MilvusServiceServer_Insert_Call{Call: _e.mock.On("Insert", _a0, _a1)}
 }
@@ -1981,8 +2122,8 @@ type MilvusServiceServer_ListCredUsers_Call struct {
 }
 
 // ListCredUsers is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListCredUsersRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListCredUsersRequest
 func (_e *MilvusServiceServer_Expecter) ListCredUsers(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListCredUsers_Call {
 	return &MilvusServiceServer_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", _a0, _a1)}
 }
@@ -2028,8 +2169,8 @@ type MilvusServiceServer_ListImportTasks_Call struct {
 }
 
 // ListImportTasks is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ListImportTasksRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListImportTasksRequest
 func (_e *MilvusServiceServer_Expecter) ListImportTasks(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListImportTasks_Call {
 	return &MilvusServiceServer_ListImportTasks_Call{Call: _e.mock.On("ListImportTasks", _a0, _a1)}
 }
@@ -2046,6 +2187,53 @@ func (_c *MilvusServiceServer_ListImportTasks_Call) Return(_a0 *milvuspb.ListImp
 	return _c
 }
 
+// ListResourceGroups provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) ListResourceGroups(_a0 context.Context, _a1 *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *milvuspb.ListResourceGroupsResponse
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) *milvuspb.ListResourceGroupsResponse); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*milvuspb.ListResourceGroupsResponse)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListResourceGroupsRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_ListResourceGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListResourceGroups'
+type MilvusServiceServer_ListResourceGroups_Call struct {
+	*mock.Call
+}
+
+// ListResourceGroups is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ListResourceGroupsRequest
+func (_e *MilvusServiceServer_Expecter) ListResourceGroups(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ListResourceGroups_Call {
+	return &MilvusServiceServer_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_ListResourceGroups_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.ListResourceGroupsRequest)) *MilvusServiceServer_ListResourceGroups_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.ListResourceGroupsRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_ListResourceGroups_Call) Return(_a0 *milvuspb.ListResourceGroupsResponse, _a1 error) *MilvusServiceServer_ListResourceGroups_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // LoadBalance provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) LoadBalance(_a0 context.Context, _a1 *milvuspb.LoadBalanceRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
@@ -2075,8 +2263,8 @@ type MilvusServiceServer_LoadBalance_Call struct {
 }
 
 // LoadBalance is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadBalanceRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadBalanceRequest
 func (_e *MilvusServiceServer_Expecter) LoadBalance(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadBalance_Call {
 	return &MilvusServiceServer_LoadBalance_Call{Call: _e.mock.On("LoadBalance", _a0, _a1)}
 }
@@ -2122,8 +2310,8 @@ type MilvusServiceServer_LoadCollection_Call struct {
 }
 
 // LoadCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadCollectionRequest
 func (_e *MilvusServiceServer_Expecter) LoadCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadCollection_Call {
 	return &MilvusServiceServer_LoadCollection_Call{Call: _e.mock.On("LoadCollection", _a0, _a1)}
 }
@@ -2169,8 +2357,8 @@ type MilvusServiceServer_LoadPartitions_Call struct {
 }
 
 // LoadPartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.LoadPartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.LoadPartitionsRequest
 func (_e *MilvusServiceServer_Expecter) LoadPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_LoadPartitions_Call {
 	return &MilvusServiceServer_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", _a0, _a1)}
 }
@@ -2216,8 +2404,8 @@ type MilvusServiceServer_ManualCompaction_Call struct {
 }
 
 // ManualCompaction is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ManualCompactionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ManualCompactionRequest
 func (_e *MilvusServiceServer_Expecter) ManualCompaction(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ManualCompaction_Call {
 	return &MilvusServiceServer_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", _a0, _a1)}
 }
@@ -2263,8 +2451,8 @@ type MilvusServiceServer_OperatePrivilege_Call struct {
 }
 
 // OperatePrivilege is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.OperatePrivilegeRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.OperatePrivilegeRequest
 func (_e *MilvusServiceServer_Expecter) OperatePrivilege(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperatePrivilege_Call {
 	return &MilvusServiceServer_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", _a0, _a1)}
 }
@@ -2310,8 +2498,8 @@ type MilvusServiceServer_OperateUserRole_Call struct {
 }
 
 // OperateUserRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.OperateUserRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.OperateUserRoleRequest
 func (_e *MilvusServiceServer_Expecter) OperateUserRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_OperateUserRole_Call {
 	return &MilvusServiceServer_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", _a0, _a1)}
 }
@@ -2357,8 +2545,8 @@ type MilvusServiceServer_Query_Call struct {
 }
 
 // Query is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.QueryRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.QueryRequest
 func (_e *MilvusServiceServer_Expecter) Query(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Query_Call {
 	return &MilvusServiceServer_Query_Call{Call: _e.mock.On("Query", _a0, _a1)}
 }
@@ -2404,8 +2592,8 @@ type MilvusServiceServer_RegisterLink_Call struct {
 }
 
 // RegisterLink is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.RegisterLinkRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.RegisterLinkRequest
 func (_e *MilvusServiceServer_Expecter) RegisterLink(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RegisterLink_Call {
 	return &MilvusServiceServer_RegisterLink_Call{Call: _e.mock.On("RegisterLink", _a0, _a1)}
 }
@@ -2451,8 +2639,8 @@ type MilvusServiceServer_ReleaseCollection_Call struct {
 }
 
 // ReleaseCollection is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ReleaseCollectionRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ReleaseCollectionRequest
 func (_e *MilvusServiceServer_Expecter) ReleaseCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleaseCollection_Call {
 	return &MilvusServiceServer_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", _a0, _a1)}
 }
@@ -2498,8 +2686,8 @@ type MilvusServiceServer_ReleasePartitions_Call struct {
 }
 
 // ReleasePartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ReleasePartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ReleasePartitionsRequest
 func (_e *MilvusServiceServer_Expecter) ReleasePartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ReleasePartitions_Call {
 	return &MilvusServiceServer_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", _a0, _a1)}
 }
@@ -2516,6 +2704,53 @@ func (_c *MilvusServiceServer_ReleasePartitions_Call) Return(_a0 *commonpb.Statu
 	return _c
 }
 
+// RenameCollection provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) RenameCollection(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RenameCollectionRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_RenameCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenameCollection'
+type MilvusServiceServer_RenameCollection_Call struct {
+	*mock.Call
+}
+
+// RenameCollection is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.RenameCollectionRequest
+func (_e *MilvusServiceServer_Expecter) RenameCollection(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RenameCollection_Call {
+	return &MilvusServiceServer_RenameCollection_Call{Call: _e.mock.On("RenameCollection", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_RenameCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RenameCollectionRequest)) *MilvusServiceServer_RenameCollection_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.RenameCollectionRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_RenameCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_RenameCollection_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
 // Search provides a mock function with given fields: _a0, _a1
 func (_m *MilvusServiceServer) Search(_a0 context.Context, _a1 *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) {
 	ret := _m.Called(_a0, _a1)
@@ -2545,8 +2780,8 @@ type MilvusServiceServer_Search_Call struct {
 }
 
 // Search is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SearchRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SearchRequest
 func (_e *MilvusServiceServer_Expecter) Search(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Search_Call {
 	return &MilvusServiceServer_Search_Call{Call: _e.mock.On("Search", _a0, _a1)}
 }
@@ -2592,8 +2827,8 @@ type MilvusServiceServer_SelectGrant_Call struct {
 }
 
 // SelectGrant is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectGrantRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectGrantRequest
 func (_e *MilvusServiceServer_Expecter) SelectGrant(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectGrant_Call {
 	return &MilvusServiceServer_SelectGrant_Call{Call: _e.mock.On("SelectGrant", _a0, _a1)}
 }
@@ -2639,8 +2874,8 @@ type MilvusServiceServer_SelectRole_Call struct {
 }
 
 // SelectRole is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectRoleRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectRoleRequest
 func (_e *MilvusServiceServer_Expecter) SelectRole(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectRole_Call {
 	return &MilvusServiceServer_SelectRole_Call{Call: _e.mock.On("SelectRole", _a0, _a1)}
 }
@@ -2686,8 +2921,8 @@ type MilvusServiceServer_SelectUser_Call struct {
 }
 
 // SelectUser is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.SelectUserRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.SelectUserRequest
 func (_e *MilvusServiceServer_Expecter) SelectUser(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_SelectUser_Call {
 	return &MilvusServiceServer_SelectUser_Call{Call: _e.mock.On("SelectUser", _a0, _a1)}
 }
@@ -2733,8 +2968,8 @@ type MilvusServiceServer_ShowCollections_Call struct {
 }
 
 // ShowCollections is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ShowCollectionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ShowCollectionsRequest
 func (_e *MilvusServiceServer_Expecter) ShowCollections(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowCollections_Call {
 	return &MilvusServiceServer_ShowCollections_Call{Call: _e.mock.On("ShowCollections", _a0, _a1)}
 }
@@ -2780,8 +3015,8 @@ type MilvusServiceServer_ShowPartitions_Call struct {
 }
 
 // ShowPartitions is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.ShowPartitionsRequest
+//  - _a0 context.Context
+//  - _a1 *milvuspb.ShowPartitionsRequest
 func (_e *MilvusServiceServer_Expecter) ShowPartitions(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_ShowPartitions_Call {
 	return &MilvusServiceServer_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", _a0, _a1)}
 }
@@ -2798,12 +3033,12 @@ func (_c *MilvusServiceServer_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPart
 	return _c
 }
 
-// UpdateCredential provides a mock function with given fields: _a0, _a1
-func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error) {
+// TransferNode provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) TransferNode(_a0 context.Context, _a1 *milvuspb.TransferNodeRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
 
 	var r0 *commonpb.Status
-	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateCredentialRequest) *commonpb.Status); ok {
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
 		if ret.Get(0) != nil {
@@ -2812,7 +3047,7 @@ func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvus
 	}
 
 	var r1 error
-	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.UpdateCredentialRequest) error); ok {
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferNodeRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
 		r1 = ret.Error(1)
@@ -2821,45 +3056,45 @@ func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvus
 	return r0, r1
 }
 
-// MilvusServiceServer_UpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCredential'
-type MilvusServiceServer_UpdateCredential_Call struct {
+// MilvusServiceServer_TransferNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferNode'
+type MilvusServiceServer_TransferNode_Call struct {
 	*mock.Call
 }
 
-// UpdateCredential is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.UpdateCredentialRequest
-func (_e *MilvusServiceServer_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_UpdateCredential_Call {
-	return &MilvusServiceServer_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)}
+// TransferNode is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.TransferNodeRequest
+func (_e *MilvusServiceServer_Expecter) TransferNode(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferNode_Call {
+	return &MilvusServiceServer_TransferNode_Call{Call: _e.mock.On("TransferNode", _a0, _a1)}
 }
 
-func (_c *MilvusServiceServer_UpdateCredential_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest)) *MilvusServiceServer_UpdateCredential_Call {
+func (_c *MilvusServiceServer_TransferNode_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.TransferNodeRequest)) *MilvusServiceServer_TransferNode_Call {
 	_c.Call.Run(func(args mock.Arguments) {
-		run(args[0].(context.Context), args[1].(*milvuspb.UpdateCredentialRequest))
+		run(args[0].(context.Context), args[1].(*milvuspb.TransferNodeRequest))
 	})
 	return _c
 }
 
-func (_c *MilvusServiceServer_UpdateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_UpdateCredential_Call {
+func (_c *MilvusServiceServer_TransferNode_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_TransferNode_Call {
 	_c.Call.Return(_a0, _a1)
 	return _c
 }
 
-// Upsert provides a mock function with given fields: _a0, _a1
-func (_m *MilvusServiceServer) Upsert(_a0 context.Context, _a1 *milvuspb.UpsertRequest) (*milvuspb.MutationResult, error) {
+// TransferReplica provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) TransferReplica(_a0 context.Context, _a1 *milvuspb.TransferReplicaRequest) (*commonpb.Status, error) {
 	ret := _m.Called(_a0, _a1)
 
-	var r0 *milvuspb.MutationResult
-	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpsertRequest) *milvuspb.MutationResult); ok {
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferReplicaRequest) *commonpb.Status); ok {
 		r0 = rf(_a0, _a1)
 	} else {
 		if ret.Get(0) != nil {
-			r0 = ret.Get(0).(*milvuspb.MutationResult)
+			r0 = ret.Get(0).(*commonpb.Status)
 		}
 	}
 
 	var r1 error
-	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.UpsertRequest) error); ok {
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferReplicaRequest) error); ok {
 		r1 = rf(_a0, _a1)
 	} else {
 		r1 = ret.Error(1)
@@ -2868,26 +3103,73 @@ func (_m *MilvusServiceServer) Upsert(_a0 context.Context, _a1 *milvuspb.UpsertR
 	return r0, r1
 }
 
-// MilvusServiceServer_Upsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upsert'
-type MilvusServiceServer_Upsert_Call struct {
+// MilvusServiceServer_TransferReplica_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferReplica'
+type MilvusServiceServer_TransferReplica_Call struct {
 	*mock.Call
 }
 
-// Upsert is a helper method to define mock.On call
-//   - _a0 context.Context
-//   - _a1 *milvuspb.UpsertRequest
-func (_e *MilvusServiceServer_Expecter) Upsert(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_Upsert_Call {
-	return &MilvusServiceServer_Upsert_Call{Call: _e.mock.On("Upsert", _a0, _a1)}
+// TransferReplica is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.TransferReplicaRequest
+func (_e *MilvusServiceServer_Expecter) TransferReplica(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_TransferReplica_Call {
+	return &MilvusServiceServer_TransferReplica_Call{Call: _e.mock.On("TransferReplica", _a0, _a1)}
 }
 
-func (_c *MilvusServiceServer_Upsert_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.UpsertRequest)) *MilvusServiceServer_Upsert_Call {
+func (_c *MilvusServiceServer_TransferReplica_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.TransferReplicaRequest)) *MilvusServiceServer_TransferReplica_Call {
 	_c.Call.Run(func(args mock.Arguments) {
-		run(args[0].(context.Context), args[1].(*milvuspb.UpsertRequest))
+		run(args[0].(context.Context), args[1].(*milvuspb.TransferReplicaRequest))
 	})
 	return _c
 }
 
-func (_c *MilvusServiceServer_Upsert_Call) Return(_a0 *milvuspb.MutationResult, _a1 error) *MilvusServiceServer_Upsert_Call {
+func (_c *MilvusServiceServer_TransferReplica_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_TransferReplica_Call {
+	_c.Call.Return(_a0, _a1)
+	return _c
+}
+
+// UpdateCredential provides a mock function with given fields: _a0, _a1
+func (_m *MilvusServiceServer) UpdateCredential(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error) {
+	ret := _m.Called(_a0, _a1)
+
+	var r0 *commonpb.Status
+	if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateCredentialRequest) *commonpb.Status); ok {
+		r0 = rf(_a0, _a1)
+	} else {
+		if ret.Get(0) != nil {
+			r0 = ret.Get(0).(*commonpb.Status)
+		}
+	}
+
+	var r1 error
+	if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.UpdateCredentialRequest) error); ok {
+		r1 = rf(_a0, _a1)
+	} else {
+		r1 = ret.Error(1)
+	}
+
+	return r0, r1
+}
+
+// MilvusServiceServer_UpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCredential'
+type MilvusServiceServer_UpdateCredential_Call struct {
+	*mock.Call
+}
+
+// UpdateCredential is a helper method to define mock.On call
+//  - _a0 context.Context
+//  - _a1 *milvuspb.UpdateCredentialRequest
+func (_e *MilvusServiceServer_Expecter) UpdateCredential(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_UpdateCredential_Call {
+	return &MilvusServiceServer_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", _a0, _a1)}
+}
+
+func (_c *MilvusServiceServer_UpdateCredential_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.UpdateCredentialRequest)) *MilvusServiceServer_UpdateCredential_Call {
+	_c.Call.Run(func(args mock.Arguments) {
+		run(args[0].(context.Context), args[1].(*milvuspb.UpdateCredentialRequest))
+	})
+	return _c
+}
+
+func (_c *MilvusServiceServer_UpdateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_UpdateCredential_Call {
 	_c.Call.Return(_a0, _a1)
 	return _c
 }


Test patch:
diff --git a/client/client_grpc_alias_test.go b/client/client_grpc_alias_test.go
index 29687f7..f6f77b3 100644
--- a/client/client_grpc_alias_test.go
+++ b/client/client_grpc_alias_test.go
@@ -33,7 +33,7 @@ func TestGrpcCreateAlias(t *testing.T) {
 
 	t.Run("normal create alias", func(t *testing.T) {
 
-		mock.SetInjection(MCreateAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateAliasRequest)
 			if !ok {
 				t.FailNow()
@@ -43,14 +43,14 @@ func TestGrpcCreateAlias(t *testing.T) {
 
 			return &common.Status{ErrorCode: common.ErrorCode_Success}, nil
 		})
-		defer mock.DelInjection(MCreateAlias)
+		defer mockServer.DelInjection(MCreateAlias)
 		err := c.CreateAlias(ctx, "testcoll", "collAlias")
 		assert.NoError(t, err)
 	})
 
 	t.Run("alias duplicated", func(t *testing.T) {
 		m := make(map[string]struct{})
-		mock.SetInjection(MCreateAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateAliasRequest)
 			if !ok {
 				t.FailNow()
@@ -63,7 +63,7 @@ func TestGrpcCreateAlias(t *testing.T) {
 			m[req.GetAlias()] = struct{}{}
 			return &common.Status{ErrorCode: status}, nil
 		})
-		defer mock.DelInjection(MCreateAlias)
+		defer mockServer.DelInjection(MCreateAlias)
 
 		collName := "testColl"
 		aliasName := "collAlias"
@@ -80,7 +80,7 @@ func TestGrpcDropAlias(t *testing.T) {
 	defer c.Close()
 
 	t.Run("normal drop alias", func(t *testing.T) {
-		mock.SetInjection(MDropAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDropAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DropAliasRequest)
 			if !ok {
 				t.FailNow()
@@ -89,13 +89,13 @@ func TestGrpcDropAlias(t *testing.T) {
 
 			return &common.Status{ErrorCode: common.ErrorCode_Success}, nil
 		})
-		defer mock.DelInjection(MDropAlias)
+		defer mockServer.DelInjection(MDropAlias)
 		err := c.DropAlias(ctx, "collAlias")
 		assert.NoError(t, err)
 	})
 
 	t.Run("drop alias error", func(t *testing.T) {
-		mock.SetInjection(MDropAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDropAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DropAliasRequest)
 			if !ok {
 				t.FailNow()
@@ -104,7 +104,7 @@ func TestGrpcDropAlias(t *testing.T) {
 
 			return &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil
 		})
-		defer mock.DelInjection(MDropAlias)
+		defer mockServer.DelInjection(MDropAlias)
 		err := c.DropAlias(ctx, "collAlias")
 		assert.Error(t, err)
 	})
@@ -119,7 +119,7 @@ func TestGrpcAlterAlias(t *testing.T) {
 	aliasName := "collAlias"
 
 	t.Run("normal alter alias", func(t *testing.T) {
-		mock.SetInjection(MAlterAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MAlterAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.AlterAliasRequest)
 			if !ok {
 				t.FailNow()
@@ -129,13 +129,13 @@ func TestGrpcAlterAlias(t *testing.T) {
 
 			return &common.Status{ErrorCode: common.ErrorCode_Success}, nil
 		})
-		defer mock.DelInjection(MAlterAlias)
+		defer mockServer.DelInjection(MAlterAlias)
 		err := c.AlterAlias(ctx, collName, aliasName)
 		assert.NoError(t, err)
 	})
 
 	t.Run("alter alias error", func(t *testing.T) {
-		mock.SetInjection(MAlterAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MAlterAlias, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.AlterAliasRequest)
 			if !ok {
 				t.FailNow()
@@ -145,7 +145,7 @@ func TestGrpcAlterAlias(t *testing.T) {
 
 			return &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil
 		})
-		defer mock.DelInjection(MAlterAlias)
+		defer mockServer.DelInjection(MAlterAlias)
 		err := c.AlterAlias(ctx, collName, aliasName)
 		assert.Error(t, err)
 	})
diff --git a/client/client_grpc_authentication_test.go b/client/client_grpc_authentication_test.go
index caf3176..8e2478f 100644
--- a/client/client_grpc_authentication_test.go
+++ b/client/client_grpc_authentication_test.go
@@ -16,42 +16,42 @@ func TestGrpcClient_CreateCredential(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("create credential normal", func(t *testing.T) {
-		mock.SetInjection(MCreateCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
 			s, err := SuccessStatus()
 			return s, err
 		})
-		defer mock.DelInjection(MCreateCredential)
+		defer mockServer.DelInjection(MCreateCredential)
 		err := c.CreateCredential(ctx, testUsername, testPassword)
 		assert.Nil(t, err)
 	})
 
 	t.Run("create credential invalid name", func(t *testing.T) {
-		mock.SetInjection(MCreateCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
 			s, err := BadRequestStatus()
 			return s, err
 		})
-		defer mock.DelInjection(MCreateCredential)
+		defer mockServer.DelInjection(MCreateCredential)
 		err := c.CreateCredential(ctx, "123", testPassword)
 		assert.Error(t, err)
 	})
 
 	t.Run("create credential grpc error", func(t *testing.T) {
-		mock.SetInjection(MCreateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{}, errors.New("mocked grpc error")
 		})
-		defer mock.DelInjection(MCreateCredential)
+		defer mockServer.DelInjection(MCreateCredential)
 		err := c.CreateCredential(ctx, testUsername, testPassword)
 		assert.Error(t, err)
 	})
 
 	t.Run("create credential server error", func(t *testing.T) {
-		mock.SetInjection(MCreateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{
 				ErrorCode: common.ErrorCode_UnexpectedError,
 				Reason:    "Service is not healthy",
 			}, nil
 		})
-		defer mock.DelInjection(MCreateCredential)
+		defer mockServer.DelInjection(MCreateCredential)
 		err := c.CreateCredential(ctx, testUsername, testPassword)
 		assert.Error(t, err)
 	})
@@ -62,32 +62,32 @@ func TestGrpcClient_UpdateCredential(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("update credential normal", func(t *testing.T) {
-		mock.SetInjection(MUpdateCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MUpdateCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
 			s, err := SuccessStatus()
 			return s, err
 		})
-		defer mock.DelInjection(MUpdateCredential)
+		defer mockServer.DelInjection(MUpdateCredential)
 		err := c.UpdateCredential(ctx, testUsername, testPassword, testPassword)
 		assert.Nil(t, err)
 	})
 
 	t.Run("update credential grpc error", func(t *testing.T) {
-		mock.SetInjection(MUpdateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MUpdateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{}, errors.New("mocked grpc error")
 		})
-		defer mock.DelInjection(MUpdateCredential)
+		defer mockServer.DelInjection(MUpdateCredential)
 		err := c.UpdateCredential(ctx, testUsername, testPassword, testPassword)
 		assert.Error(t, err)
 	})
 
 	t.Run("update credential server error", func(t *testing.T) {
-		mock.SetInjection(MUpdateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MUpdateCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{
 				ErrorCode: common.ErrorCode_UnexpectedError,
 				Reason:    "Service is not healthy",
 			}, nil
 		})
-		defer mock.DelInjection(MUpdateCredential)
+		defer mockServer.DelInjection(MUpdateCredential)
 		err := c.UpdateCredential(ctx, testUsername, testPassword, testPassword)
 		assert.Error(t, err)
 	})
@@ -98,32 +98,32 @@ func TestGrpcClient_DeleteCredential(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("delete credential normal", func(t *testing.T) {
-		mock.SetInjection(MDeleteCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDeleteCredential, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
 			s, err := SuccessStatus()
 			return s, err
 		})
-		defer mock.DelInjection(MDeleteCredential)
+		defer mockServer.DelInjection(MDeleteCredential)
 		err := c.DeleteCredential(ctx, testUsername)
 		assert.Nil(t, err)
 	})
 
 	t.Run("delete credential grpc error", func(t *testing.T) {
-		mock.SetInjection(MDeleteCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDeleteCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{}, errors.New("mocked grpc error")
 		})
-		defer mock.DelInjection(MDeleteCredential)
+		defer mockServer.DelInjection(MDeleteCredential)
 		err := c.DeleteCredential(ctx, testUsername)
 		assert.Error(t, err)
 	})
 
 	t.Run("delete credential server error", func(t *testing.T) {
-		mock.SetInjection(MDeleteCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDeleteCredential, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{
 				ErrorCode: common.ErrorCode_UnexpectedError,
 				Reason:    "Service is not healthy",
 			}, nil
 		})
-		defer mock.DelInjection(MDeleteCredential)
+		defer mockServer.DelInjection(MDeleteCredential)
 		err := c.DeleteCredential(ctx, testUsername)
 		assert.Error(t, err)
 	})
@@ -134,7 +134,7 @@ func TestGrpcClient_ListCredUsers(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("list credential users normal", func(t *testing.T) {
-		mock.SetInjection(MListCredUsers, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MListCredUsers, func(ctx context.Context, _ proto.Message) (proto.Message, error) {
 			resp := &server.ListCredUsersResponse{
 				Usernames: []string{testUsername},
 			}
@@ -142,23 +142,23 @@ func TestGrpcClient_ListCredUsers(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MListCredUsers)
+		defer mockServer.DelInjection(MListCredUsers)
 		names, err := c.ListCredUsers(ctx)
 		assert.Nil(t, err)
 		assert.Equal(t, []string{testUsername}, names)
 	})
 
 	t.Run("list credential users grpc error", func(t *testing.T) {
-		mock.SetInjection(MListCredUsers, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MListCredUsers, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.ListCredUsersResponse{}, errors.New("mocked grpc error")
 		})
-		defer mock.DelInjection(MListCredUsers)
+		defer mockServer.DelInjection(MListCredUsers)
 		_, err := c.ListCredUsers(ctx)
 		assert.Error(t, err)
 	})
 
 	t.Run("list credential users server error", func(t *testing.T) {
-		mock.SetInjection(MListCredUsers, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MListCredUsers, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.ListCredUsersResponse{
 				Status: &common.Status{
 					ErrorCode: common.ErrorCode_UnexpectedError,
@@ -166,7 +166,7 @@ func TestGrpcClient_ListCredUsers(t *testing.T) {
 				},
 			}, nil
 		})
-		defer mock.DelInjection(MListCredUsers)
+		defer mockServer.DelInjection(MListCredUsers)
 		_, err := c.ListCredUsers(ctx)
 		assert.Error(t, err)
 	})
diff --git a/client/client_grpc_collection_test.go b/client/client_grpc_collection_test.go
index b99c71d..0a4e20f 100644
--- a/client/client_grpc_collection_test.go
+++ b/client/client_grpc_collection_test.go
@@ -53,7 +53,7 @@ func TestGrpcClientListCollections(t *testing.T) {
 	}
 
 	for _, tc := range cases {
-		mock.SetInjection(MShowCollections, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowCollections, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			s, err := SuccessStatus()
 			resp := &server.ShowCollectionsResponse{
 				Status:              s,
@@ -91,11 +91,11 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
 	// default, all collection name returns false
-	mock.DelInjection(MHasCollection)
+	mockServer.DelInjection(MHasCollection)
 	t.Run("Test normal creation", func(t *testing.T) {
 		ds := defaultSchema()
 		shardsNum := int32(1)
-		mock.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateCollectionRequest)
 			if !ok {
 				return &common.Status{ErrorCode: common.ErrorCode_IllegalArgument}, errors.New("illegal request type")
@@ -117,13 +117,13 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 			return &common.Status{ErrorCode: common.ErrorCode_Success}, nil
 		})
 		assert.Nil(t, c.CreateCollection(ctx, ds, shardsNum))
-		mock.DelInjection(MCreateCollection)
+		mockServer.DelInjection(MCreateCollection)
 	})
 
 	t.Run("Test create with consistency level", func(t *testing.T) {
 		ds := defaultSchema()
 		shardsNum := int32(1)
-		mock.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateCollectionRequest)
 			if !ok {
 				return &common.Status{ErrorCode: common.ErrorCode_IllegalArgument}, errors.New("illegal request type")
@@ -134,7 +134,7 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 			return &common.Status{ErrorCode: common.ErrorCode_Success}, nil
 		})
 		assert.Nil(t, c.CreateCollection(ctx, ds, shardsNum, WithConsistencyLevel(entity.ClEventually)))
-		mock.DelInjection(MCreateCollection)
+		mockServer.DelInjection(MCreateCollection)
 	})
 
 	t.Run("Test invalid schemas", func(t *testing.T) {
@@ -222,20 +222,20 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 			},
 		}
 		shardsNum := int32(1) // <= 0 will used default shards num 2, skip check
-		mock.SetInjection(MCreateCollection, func(_ context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(_ context.Context, _ proto.Message) (proto.Message, error) {
 			// should not be here!
 			assert.FailNow(t, "should not be here")
 			return nil, errors.New("should not be here")
 		})
 		for _, s := range cases {
 			assert.NotNil(t, c.CreateCollection(ctx, s, shardsNum))
-			mock.DelInjection(MCreateCollection)
+			mockServer.DelInjection(MCreateCollection)
 		}
 	})
 
 	t.Run("test duplicated collection", func(t *testing.T) {
 		m := make(map[string]struct{})
-		mock.SetInjection(MCreateCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateCollectionRequest)
 			if !ok {
 				return BadRequestStatus()
@@ -244,8 +244,8 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 
 			return SuccessStatus()
 		})
-		defer mock.DelInjection(MCreateCollection)
-		mock.SetInjection(MHasCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		defer mockServer.DelInjection(MCreateCollection)
+		mockServer.SetInjection(MHasCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.HasCollectionRequest)
 			resp := &server.BoolResponse{}
 			if !ok {
@@ -258,14 +258,14 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MHasCollection)
+		defer mockServer.DelInjection(MHasCollection)
 
 		assert.Nil(t, c.CreateCollection(ctx, defaultSchema(), 1))
 		assert.NotNil(t, c.CreateCollection(ctx, defaultSchema(), 1))
 	})
 
 	t.Run("test server returns error", func(t *testing.T) {
-		mock.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.CreateCollectionRequest)
 			if !ok {
 				return BadRequestStatus()
@@ -277,12 +277,12 @@ func TestGrpcClientCreateCollection(t *testing.T) {
 		})
 		assert.Error(t, c.CreateCollection(ctx, defaultSchema(), 1))
 
-		mock.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{}, errors.New("mocked grpc error")
 		})
 
 		assert.Error(t, c.CreateCollection(ctx, defaultSchema(), 1))
-		mock.DelInjection(MCreateCollection)
+		mockServer.DelInjection(MCreateCollection)
 	})
 }
 
@@ -305,8 +305,8 @@ func TestGrpcClientDropCollection(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDropCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDropCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := (raw).(*server.DropCollectionRequest)
 		if !ok {
 			return BadRequestStatus()
@@ -329,9 +329,9 @@ func TestGrpcClientDropCollection(t *testing.T) {
 func TestGrpcClientLoadCollection(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 	// injection check collection name equals
-	mock.SetInjection(MLoadCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MLoadCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.LoadCollectionRequest)
 		if !ok {
 			return BadRequestStatus()
@@ -348,7 +348,7 @@ func TestGrpcClientLoadCollection(t *testing.T) {
 		passed := false                  // ### flag variable
 		start := time.Now()
 
-		mock.SetInjection(MShowCollections, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowCollections, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.ShowCollectionsRequest)
 			r := &server.ShowCollectionsResponse{}
 			if !ok || req == nil {
@@ -378,10 +378,10 @@ func TestGrpcClientLoadCollection(t *testing.T) {
 		assert.NotNil(t, c.LoadCollection(quickCtx, testCollectionName, false))
 
 		// remove injection
-		mock.DelInjection(MShowCollections)
+		mockServer.DelInjection(MShowCollections)
 	})
 	t.Run("Load default replica", func(t *testing.T) {
-		mock.SetInjection(MLoadCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MLoadCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.LoadCollectionRequest)
 			if !ok {
 				return BadRequestStatus()
@@ -390,13 +390,13 @@ func TestGrpcClientLoadCollection(t *testing.T) {
 			assert.Equal(t, testCollectionName, req.GetCollectionName())
 			return SuccessStatus()
 		})
-		defer mock.DelInjection(MLoadCollection)
+		defer mockServer.DelInjection(MLoadCollection)
 		assert.Nil(t, c.LoadCollection(ctx, testCollectionName, true))
 	})
 	t.Run("Load multiple replica", func(t *testing.T) {
-		mock.DelInjection(MLoadCollection)
+		mockServer.DelInjection(MLoadCollection)
 
-		mock.SetInjection(MLoadCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MLoadCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.LoadCollectionRequest)
 			if !ok {
 				return BadRequestStatus()
@@ -405,7 +405,7 @@ func TestGrpcClientLoadCollection(t *testing.T) {
 			assert.Equal(t, testCollectionName, req.GetCollectionName())
 			return SuccessStatus()
 		})
-		defer mock.DelInjection(MLoadCollection)
+		defer mockServer.DelInjection(MLoadCollection)
 		assert.Nil(t, c.LoadCollection(ctx, testCollectionName, true, WithReplicaNumber(testMultiReplicaNumber)))
 	})
 }
@@ -415,7 +415,7 @@ func TestReleaseCollection(t *testing.T) {
 
 	c := testClient(ctx, t)
 
-	mock.SetInjection(MReleaseCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MReleaseCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.ReleaseCollectionRequest)
 		if !ok {
 			return BadRequestStatus()
@@ -432,7 +432,7 @@ func TestGrpcClientHasCollection(t *testing.T) {
 
 	c := testClient(ctx, t)
 
-	mock.SetInjection(MHasCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MHasCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.HasCollectionRequest)
 		resp := &server.BoolResponse{}
 		if !ok {
@@ -509,7 +509,7 @@ func TestGrpcClientDescribeCollection(t *testing.T) {
 
 	collectionID := rand.Int63()
 
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, collectionID, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, collectionID, testCollectionName, defaultSchema()))
 
 	collection, err := c.DescribeCollection(ctx, testCollectionName)
 	assert.Nil(t, err)
@@ -526,7 +526,7 @@ func TestGrpcClientGetCollectionStatistics(t *testing.T) {
 	stat := make(map[string]string)
 	stat["row_count"] = "0"
 
-	mock.SetInjection(MGetCollectionStatistics, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MGetCollectionStatistics, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.GetCollectionStatisticsRequest)
 		resp := &server.GetCollectionStatisticsResponse{}
 		if !ok {
@@ -557,10 +557,10 @@ func TestGrpcClientGetReplicas(t *testing.T) {
 
 	replicaID := rand.Int63()
 	nodeIds := []int64{1, 2, 3, 4}
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	defer mock.DelInjection(MHasCollection)
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	defer mockServer.DelInjection(MHasCollection)
 
-	mock.SetInjection(MShowCollections, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MShowCollections, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		s, err := SuccessStatus()
 		resp := &server.ShowCollectionsResponse{
 			Status:              s,
@@ -570,9 +570,9 @@ func TestGrpcClientGetReplicas(t *testing.T) {
 		}
 		return resp, err
 	})
-	defer mock.DelInjection(MShowCollections)
+	defer mockServer.DelInjection(MShowCollections)
 
-	mock.SetInjection(MGetReplicas, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MGetReplicas, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.GetReplicasRequest)
 		resp := &server.GetReplicasResponse{}
 		if !ok {
@@ -619,7 +619,7 @@ func TestGrpcClientGetReplicas(t *testing.T) {
 	})
 
 	t.Run("get replicas grpc error", func(t *testing.T) {
-		mock.SetInjection(MGetReplicas, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetReplicas, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.GetReplicasResponse{}, errors.New("mocked grpc error")
 		})
 		_, err := c.GetReplicas(ctx, testCollectionName)
@@ -627,7 +627,7 @@ func TestGrpcClientGetReplicas(t *testing.T) {
 	})
 
 	t.Run("get replicas server error", func(t *testing.T) {
-		mock.SetInjection(MGetReplicas, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetReplicas, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.GetReplicasResponse{
 				Status: &common.Status{
 					ErrorCode: common.ErrorCode_UnexpectedError,
@@ -640,16 +640,16 @@ func TestGrpcClientGetReplicas(t *testing.T) {
 		assert.Error(t, err)
 	})
 
-	mock.DelInjection(MGetReplicas)
+	mockServer.DelInjection(MGetReplicas)
 }
 
 func TestGrpcClientGetLoadingProgress(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 
-	mock.SetInjection(MGetLoadingProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MGetLoadingProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.GetLoadingProgressRequest)
 		if !ok {
 			return BadRequestStatus()
@@ -676,9 +676,9 @@ func TestGrpcClientGetLoadState(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 
-	mock.SetInjection(MGetLoadState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MGetLoadState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.GetLoadStateRequest)
 		if !ok {
 			return BadRequestStatus()
diff --git a/client/client_grpc_control_test.go b/client/client_grpc_control_test.go
index dd93552..1c11326 100644
--- a/client/client_grpc_control_test.go
+++ b/client/client_grpc_control_test.go
@@ -35,15 +35,15 @@ func TestGrpcManualCompaction(t *testing.T) {
 	c := testClient(ctx, t)
 	defer c.Close()
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	defer mock.DelInjection(MHasCollection)
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	defer mockServer.DelInjection(MHasCollection)
 
 	compactionID := int64(1001)
 	t.Run("normal manual compaction", func(t *testing.T) {
 		now := time.Now()
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
-		defer mock.DelInjection(MDescribeCollection)
-		mock.SetInjection(MManualCompaction, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
+		defer mockServer.DelInjection(MDescribeCollection)
+		mockServer.SetInjection(MManualCompaction, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.ManualCompactionRequest)
 			if !ok {
 				t.FailNow()
@@ -60,7 +60,7 @@ func TestGrpcManualCompaction(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MManualCompaction)
+		defer mockServer.DelInjection(MManualCompaction)
 
 		id, err := c.ManualCompaction(ctx, testCollectionName, 0)
 		assert.NoError(t, err)
@@ -75,19 +75,19 @@ func TestGrpcManualCompaction(t *testing.T) {
 	})
 
 	t.Run("describe collection fail", func(t *testing.T) {
-		mock.SetInjection(MDescribeCollection, func(_ context.Context, _ proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeCollection, func(_ context.Context, _ proto.Message) (proto.Message, error) {
 			return &server.DescribeCollectionResponse{}, errors.New("mocked error")
 		})
-		defer mock.DelInjection(MDescribeCollection)
+		defer mockServer.DelInjection(MDescribeCollection)
 
 		_, err := c.ManualCompaction(ctx, testCollectionName, 0)
 		assert.Error(t, err)
 	})
 
 	t.Run("compaction Service error", func(t *testing.T) {
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
-		defer mock.DelInjection(MDescribeCollection)
-		mock.SetInjection(MManualCompaction, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
+		defer mockServer.DelInjection(MDescribeCollection)
+		mockServer.SetInjection(MManualCompaction, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.ManualCompactionResponse{
 				CompactionID: 1001,
 			}
@@ -96,7 +96,7 @@ func TestGrpcManualCompaction(t *testing.T) {
 
 		_, err := c.ManualCompaction(ctx, testCollectionName, 0)
 		assert.Error(t, err)
-		mock.SetInjection(MManualCompaction, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MManualCompaction, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.ManualCompactionResponse{
 				CompactionID: 1001,
 			}
@@ -106,7 +106,7 @@ func TestGrpcManualCompaction(t *testing.T) {
 			return resp, nil
 		})
 
-		defer mock.DelInjection(MManualCompaction)
+		defer mockServer.DelInjection(MManualCompaction)
 
 		_, err = c.ManualCompaction(ctx, testCollectionName, 0)
 		assert.Error(t, err)
@@ -123,7 +123,7 @@ func TestGrpcGetCompactionState(t *testing.T) {
 	t.Run("normal get compaction state", func(t *testing.T) {
 		state := common.CompactionState_Executing
 
-		mock.SetInjection(MGetCompactionState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetCompactionState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.GetCompactionStateRequest)
 			if !ok {
 				t.FailNow()
@@ -138,7 +138,7 @@ func TestGrpcGetCompactionState(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MGetCompactionState)
+		defer mockServer.DelInjection(MGetCompactionState)
 
 		result, err := c.GetCompactionState(ctx, compactionID)
 		assert.NoError(t, err)
@@ -151,14 +151,14 @@ func TestGrpcGetCompactionState(t *testing.T) {
 	})
 
 	t.Run("get compaction Service fail", func(t *testing.T) {
-		mock.SetInjection(MGetCompactionState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetCompactionState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.GetCompactionStateResponse{}
 			resp.Status = &common.Status{
 				ErrorCode: common.ErrorCode_UnexpectedError,
 			}
 			return resp, nil
 		})
-		defer mock.DelInjection(MGetCompactionState)
+		defer mockServer.DelInjection(MGetCompactionState)
 
 		_, err := c.GetCompactionState(ctx, compactionID)
 		assert.Error(t, err)
@@ -179,7 +179,7 @@ func TestGrpcGetCompactionStateWithPlans(t *testing.T) {
 			{Source: []int64{4, 5}, Target: 6, PlanType: entity.CompactionPlanMergeSegments},
 		}
 
-		mock.SetInjection(MGetCompactionStateWithPlans, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetCompactionStateWithPlans, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.GetCompactionPlansRequest)
 			if !ok {
 				t.FailNow()
@@ -202,7 +202,7 @@ func TestGrpcGetCompactionStateWithPlans(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MGetCompactionStateWithPlans)
+		defer mockServer.DelInjection(MGetCompactionStateWithPlans)
 
 		result, rPlans, err := c.GetCompactionStateWithPlans(ctx, compactionID)
 		assert.NoError(t, err)
@@ -217,14 +217,14 @@ func TestGrpcGetCompactionStateWithPlans(t *testing.T) {
 	})
 
 	t.Run("get compaction Service fail", func(t *testing.T) {
-		mock.SetInjection(MGetCompactionStateWithPlans, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetCompactionStateWithPlans, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.GetCompactionPlansResponse{}
 			resp.Status = &common.Status{
 				ErrorCode: common.ErrorCode_UnexpectedError,
 			}
 			return resp, nil
 		})
-		defer mock.DelInjection(MGetCompactionStateWithPlans)
+		defer mockServer.DelInjection(MGetCompactionStateWithPlans)
 
 		_, _, err := c.GetCompactionStateWithPlans(ctx, compactionID)
 		assert.Error(t, err)
diff --git a/client/client_grpc_data_test.go b/client/client_grpc_data_test.go
index f110c26..8b8a495 100644
--- a/client/client_grpc_data_test.go
+++ b/client/client_grpc_data_test.go
@@ -24,19 +24,19 @@ func TestGrpcClientInsert(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("test create failure due to meta", func(t *testing.T) {
-		mock.DelInjection(MHasCollection) // collection does not exist
+		mockServer.DelInjection(MHasCollection) // collection does not exist
 		ids, err := c.Insert(ctx, testCollectionName, "")
 		assert.Nil(t, ids)
 		assert.NotNil(t, err)
 
 		// partition not exists
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 		ids, err = c.Insert(ctx, testCollectionName, "_part_not_exists")
 		assert.Nil(t, ids)
 		assert.NotNil(t, err)
 
 		// field not in collection
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 		vectors := generateFloatVector(10, testVectorDim)
 		ids, err = c.Insert(ctx, testCollectionName, "",
 			entity.NewColumnInt64("extra_field", []int64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}), entity.NewColumnFloatVector(testVectorField, testVectorDim, vectors))
@@ -44,7 +44,7 @@ func TestGrpcClientInsert(t *testing.T) {
 		assert.NotNil(t, err)
 
 		// field type not match
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 		ids, err = c.Insert(ctx, testCollectionName, "",
 			entity.NewColumnInt32("int64", []int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}), entity.NewColumnFloatVector(testVectorField, testVectorDim, vectors))
 		assert.Nil(t, ids)
@@ -74,11 +74,11 @@ func TestGrpcClientInsert(t *testing.T) {
 		assert.NotNil(t, err)
 	})
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 
 	vector := generateFloatVector(4096, testVectorDim)
-	mock.SetInjection(MInsert, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MInsert, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.InsertRequest)
 		resp := &server.MutationResult{}
 		if !ok {
@@ -103,7 +103,7 @@ func TestGrpcClientInsert(t *testing.T) {
 	_, err := c.Insert(ctx, testCollectionName, "", // use default partition
 		entity.NewColumnFloatVector(testVectorField, testVectorDim, vector))
 	assert.Nil(t, err)
-	mock.DelInjection(MInsert)
+	mockServer.DelInjection(MInsert)
 }
 
 func TestGrpcClientFlush(t *testing.T) {
@@ -127,7 +127,7 @@ func TestGrpcClientFlush(t *testing.T) {
 		flushTime := 510 + rand.Intn(1500)
 		start := time.Now()
 		flag := false
-		mock.SetInjection(MFlush, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MFlush, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.FlushRequest)
 			resp := &server.FlushResponse{}
 			if !ok {
@@ -147,7 +147,7 @@ func TestGrpcClientFlush(t *testing.T) {
 			return resp, err
 		})
 
-		mock.SetInjection(MGetFlushState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetFlushState, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.GetFlushStateRequest)
 			resp := &server.GetFlushStateResponse{}
 			if !ok {
@@ -183,14 +183,14 @@ func TestGrpcDeleteByPks(t *testing.T) {
 	c := testClient(ctx, t)
 	defer c.Close()
 
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 1, testCollectionName, defaultSchema()))
-	defer mock.DelInjection(MDescribeCollection)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 1, testCollectionName, defaultSchema()))
+	defer mockServer.DelInjection(MDescribeCollection)
 
 	t.Run("normal delete by pks", func(t *testing.T) {
 		partName := "testPart"
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, partName))
-		defer mock.DelInjection(MHasPartition)
-		mock.SetInjection(MDelete, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, partName))
+		defer mockServer.DelInjection(MHasPartition)
+		mockServer.SetInjection(MDelete, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DeleteRequest)
 			if !ok {
 				t.FailNow()
@@ -203,7 +203,7 @@ func TestGrpcDeleteByPks(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MDelete)
+		defer mockServer.DelInjection(MDelete)
 
 		err := c.DeleteByPks(ctx, testCollectionName, partName, entity.NewColumnInt64(testPrimaryField, []int64{1, 2, 3}))
 		assert.NoError(t, err)
@@ -211,8 +211,8 @@ func TestGrpcDeleteByPks(t *testing.T) {
 
 	t.Run("Bad request deletes", func(t *testing.T) {
 		partName := "testPart"
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
 
 		// non-exist collection
 		err := c.DeleteByPks(ctx, "non-exists-collection", "", entity.NewColumnInt64("pk", []int64{}))
@@ -236,7 +236,7 @@ func TestGrpcDeleteByPks(t *testing.T) {
 	})
 
 	t.Run("delete services fail", func(t *testing.T) {
-		mock.SetInjection(MDelete, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDelete, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.MutationResult{}
 			return resp, errors.New("mocked error")
 		})
@@ -244,7 +244,7 @@ func TestGrpcDeleteByPks(t *testing.T) {
 		err := c.DeleteByPks(ctx, testCollectionName, "", entity.NewColumnInt64(testPrimaryField, []int64{1}))
 		assert.Error(t, err)
 
-		mock.SetInjection(MDelete, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDelete, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.MutationResult{}
 			resp.Status = &common.Status{
 				ErrorCode: common.ErrorCode_UnexpectedError,
@@ -276,12 +276,12 @@ func TestGrpcSearch(t *testing.T) {
 	})
 
 	t.Run("ok search", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 
 		expr := `int64 > 0`
 
-		mock.SetInjection(MSearch, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MSearch, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.SearchRequest)
 			resp := &server.SearchResults{}
 			if !ok {
@@ -357,11 +357,11 @@ func TestGrpcQuery(t *testing.T) {
 	partName := "testPart"
 
 	t.Run("normal query", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -406,7 +406,7 @@ func TestGrpcQuery(t *testing.T) {
 
 			return resp, err
 		})
-		defer mock.DelInjection(MQuery)
+		defer mockServer.DelInjection(MQuery)
 
 		columns, err := c.Query(ctx, testCollectionName, []string{partName}, "int64 in {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}", []string{testPrimaryField, testVectorField}, WithOffset(1), WithLimit(10))
 		assert.NoError(t, err)
@@ -433,13 +433,13 @@ func TestGrpcQuery(t *testing.T) {
 	})
 
 	t.Run("normal query varchar pks", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, varCharSchema()))
-		defer mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, varCharSchema()))
+		defer mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -484,7 +484,7 @@ func TestGrpcQuery(t *testing.T) {
 
 			return resp, err
 		})
-		defer mock.DelInjection(MQuery)
+		defer mockServer.DelInjection(MQuery)
 
 		columns, err := c.Query(ctx, testCollectionName, []string{partName}, `varchar in {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}`, []string{"varchar", testVectorField})
 		assert.NoError(t, err)
@@ -499,10 +499,10 @@ func TestGrpcQuery(t *testing.T) {
 	})
 
 	t.Run("Bad request querys", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
-		mock.SetInjection(MDescribeCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
+		mockServer.SetInjection(MDescribeCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DescribeCollectionRequest)
 			resp := &server.DescribeCollectionResponse{}
 			if !ok {
@@ -526,7 +526,7 @@ func TestGrpcQuery(t *testing.T) {
 
 			return resp, err
 		})
-		defer mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
+		defer mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
 
 		// non-exist collection
 		_, err := c.Query(ctx, "non-exists-collection", []string{}, "pk in {}", []string{})
@@ -534,11 +534,11 @@ func TestGrpcQuery(t *testing.T) {
 	})
 
 	t.Run("Query Service error", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -547,12 +547,12 @@ func TestGrpcQuery(t *testing.T) {
 			resp := &server.QueryResults{}
 			return resp, errors.New("mocked error")
 		})
-		defer mock.DelInjection(MQuery)
+		defer mockServer.DelInjection(MQuery)
 
 		_, err := c.Query(ctx, testCollectionName, []string{}, "int64 in {1}", []string{"*"})
 		assert.Error(t, err)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -569,7 +569,7 @@ func TestGrpcQuery(t *testing.T) {
 		_, err = c.Query(ctx, testCollectionName, []string{}, "int64 in {1}", []string{"*"})
 		assert.Error(t, err)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -599,7 +599,7 @@ func TestGrpcQuery(t *testing.T) {
 		_, err = c.Query(ctx, testCollectionName, []string{}, "int64 in {1}", []string{"*"})
 		assert.Error(t, err)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -638,11 +638,11 @@ func TestGrpcQueryByPks(t *testing.T) {
 	partName := "testPart"
 
 	t.Run("normal query by pks", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -687,7 +687,7 @@ func TestGrpcQueryByPks(t *testing.T) {
 
 			return resp, err
 		})
-		defer mock.DelInjection(MQuery)
+		defer mockServer.DelInjection(MQuery)
 
 		columns, err := c.QueryByPks(ctx, testCollectionName, []string{partName}, entity.NewColumnInt64(testPrimaryField, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), []string{"int64", testVectorField})
 		assert.NoError(t, err)
@@ -714,13 +714,13 @@ func TestGrpcQueryByPks(t *testing.T) {
 	})
 
 	t.Run("normal query by varchar pks", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, varCharSchema()))
-		defer mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, varCharSchema()))
+		defer mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, testCollectionID, testCollectionName, defaultSchema()))
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -765,7 +765,7 @@ func TestGrpcQueryByPks(t *testing.T) {
 
 			return resp, err
 		})
-		defer mock.DelInjection(MQuery)
+		defer mockServer.DelInjection(MQuery)
 
 		columns, err := c.QueryByPks(ctx, testCollectionName, []string{partName}, entity.NewColumnVarChar("varchar", []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}), []string{"varchar", testVectorField})
 		assert.NoError(t, err)
@@ -780,9 +780,9 @@ func TestGrpcQueryByPks(t *testing.T) {
 	})
 
 	t.Run("Bad request querys", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
 
 		// non-exist collection
 		_, err := c.QueryByPks(ctx, "non-exists-collection", []string{}, entity.NewColumnInt64("pk", []int64{}), []string{})
@@ -802,11 +802,11 @@ func TestGrpcQueryByPks(t *testing.T) {
 	})
 
 	t.Run("Query Service error", func(t *testing.T) {
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
-		mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
-		defer mock.DelInjection(MHasPartition)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partName))
+		defer mockServer.DelInjection(MHasPartition)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -815,12 +815,12 @@ func TestGrpcQueryByPks(t *testing.T) {
 			resp := &server.QueryResults{}
 			return resp, errors.New("mocked error")
 		})
-		defer mock.DelInjection(MQuery)
+		defer mockServer.DelInjection(MQuery)
 
 		_, err := c.QueryByPks(ctx, testCollectionName, []string{}, entity.NewColumnInt64(testPrimaryField, []int64{1}), []string{"*"})
 		assert.Error(t, err)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -837,7 +837,7 @@ func TestGrpcQueryByPks(t *testing.T) {
 		_, err = c.QueryByPks(ctx, testCollectionName, []string{}, entity.NewColumnInt64(testPrimaryField, []int64{1}), []string{"*"})
 		assert.Error(t, err)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -867,7 +867,7 @@ func TestGrpcQueryByPks(t *testing.T) {
 		_, err = c.QueryByPks(ctx, testCollectionName, []string{}, entity.NewColumnInt64(testPrimaryField, []int64{1}), []string{"*"})
 		assert.Error(t, err)
 
-		mock.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MQuery, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.QueryRequest)
 			if !ok {
 				t.FailNow()
@@ -910,7 +910,7 @@ func TestGrpcCalcDistanceWithIDs(t *testing.T) {
 	})
 
 	c := testClient(ctx, t)
-	mock.SetInjection(MDescribeCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MDescribeCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.DescribeCollectionRequest)
 		resp := &server.DescribeCollectionResponse{}
 		if !ok {
@@ -956,7 +956,7 @@ func TestGrpcCalcDistanceWithIDs(t *testing.T) {
 	})
 
 	t.Run("valid calls", func(t *testing.T) {
-		mock.SetInjection(MCalcDistance, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCalcDistance, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CalcDistanceRequest)
 			resp := &server.CalcDistanceResults{}
 			if !ok {
@@ -1021,7 +1021,7 @@ func TestGrpcCalcDistanceWithIDs(t *testing.T) {
 		assert.NotNil(t, r)
 
 		// test IntDistance,
-		mock.SetInjection(MCalcDistance, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCalcDistance, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CalcDistanceRequest)
 			resp := &server.CalcDistanceResults{}
 			if !ok {
@@ -1075,7 +1075,7 @@ func TestGrpcCalcDistanceWithIDs(t *testing.T) {
 		assert.NotNil(t, r)
 
 		// test str id
-		mock.SetInjection(MDescribeCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DescribeCollectionRequest)
 			resp := &server.DescribeCollectionResponse{}
 			if !ok {
@@ -1094,7 +1094,7 @@ func TestGrpcCalcDistanceWithIDs(t *testing.T) {
 			resp.Status = s
 			return resp, err
 		})
-		mock.SetInjection(MCalcDistance, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCalcDistance, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CalcDistanceRequest)
 			resp := &server.CalcDistanceResults{}
 			if !ok {
diff --git a/client/client_grpc_index_test.go b/client/client_grpc_index_test.go
index a01843e..84d8109 100644
--- a/client/client_grpc_index_test.go
+++ b/client/client_grpc_index_test.go
@@ -17,8 +17,8 @@ import (
 func TestGrpcClientCreateIndex(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 
 	fieldName := `vector`
 	idx, err := entity.NewIndexFlat(entity.IP)
@@ -26,7 +26,7 @@ func TestGrpcClientCreateIndex(t *testing.T) {
 	if !assert.NotNil(t, idx) {
 		t.FailNow()
 	}
-	mock.SetInjection(MCreateIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MCreateIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.CreateIndexRequest)
 		if !ok {
 			return BadRequestStatus()
@@ -41,13 +41,13 @@ func TestGrpcClientCreateIndex(t *testing.T) {
 	})
 
 	t.Run("test flush err", func(t *testing.T) {
-		mock.SetInjection(MFlush, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MFlush, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.FlushResponse{}
 			s, err := BadRequestStatus()
 			resp.Status = s
 			return resp, err
 		})
-		defer mock.DelInjection(MFlush)
+		defer mockServer.DelInjection(MFlush)
 		assert.NotNil(t, c.CreateIndex(ctx, testCollectionName, fieldName, idx, false))
 	})
 
@@ -55,7 +55,7 @@ func TestGrpcClientCreateIndex(t *testing.T) {
 		buildTime := rand.Intn(900) + 100
 		start := time.Now()
 		flag := false
-		mock.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DescribeIndexRequest)
 			resp := &server.DescribeIndexResponse{}
 			if !ok {
@@ -86,29 +86,29 @@ func TestGrpcClientCreateIndex(t *testing.T) {
 		assert.Nil(t, c.CreateIndex(ctx, testCollectionName, fieldName, idx, false, WithIndexName("test-index")))
 		assert.True(t, flag)
 
-		mock.DelInjection(MDescribeIndex)
+		mockServer.DelInjection(MDescribeIndex)
 	})
 }
 
 func TestGrpcClientDropIndex(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 	assert.Nil(t, c.DropIndex(ctx, testCollectionName, "vector"))
 }
 
 func TestGrpcClientDescribeIndex(t *testing.T) {
 	ctx := context.Background()
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 
 	c := testClient(ctx, t)
 
 	fieldName := "vector"
 
 	t.Run("normal describe index", func(t *testing.T) {
-		mock.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.DescribeIndexRequest)
 			resp := &server.DescribeIndexResponse{}
 			if !ok {
@@ -140,8 +140,8 @@ func TestGrpcClientDescribeIndex(t *testing.T) {
 	})
 
 	t.Run("Service return errors", func(t *testing.T) {
-		defer mock.DelInjection(MDescribeIndex)
-		mock.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		defer mockServer.DelInjection(MDescribeIndex)
+		mockServer.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.DescribeIndexResponse{}
 
 			return resp, errors.New("mocked error")
@@ -150,7 +150,7 @@ func TestGrpcClientDescribeIndex(t *testing.T) {
 		_, err := c.DescribeIndex(ctx, testCollectionName, fieldName)
 		assert.Error(t, err)
 
-		mock.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MDescribeIndex, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.DescribeIndexResponse{}
 			resp.Status = &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}
 			return resp, nil
@@ -163,8 +163,8 @@ func TestGrpcClientDescribeIndex(t *testing.T) {
 
 func TestGrpcGetIndexBuildProgress(t *testing.T) {
 	ctx := context.Background()
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 
 	tc := testClient(ctx, t)
 	c := tc.(*GrpcClient) // since GetIndexBuildProgress is not exposed
@@ -172,7 +172,7 @@ func TestGrpcGetIndexBuildProgress(t *testing.T) {
 	t.Run("normal get index build progress", func(t *testing.T) {
 		var total, built int64
 
-		mock.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.GetIndexBuildProgressRequest)
 			if !ok {
 				t.FailNow()
@@ -196,8 +196,8 @@ func TestGrpcGetIndexBuildProgress(t *testing.T) {
 	})
 
 	t.Run("Service return errors", func(t *testing.T) {
-		defer mock.DelInjection(MGetIndexBuildProgress)
-		mock.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		defer mockServer.DelInjection(MGetIndexBuildProgress)
+		mockServer.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.GetIndexBuildProgressRequest)
 			if !ok {
 				t.FailNow()
@@ -209,7 +209,7 @@ func TestGrpcGetIndexBuildProgress(t *testing.T) {
 		_, _, err := c.GetIndexBuildProgress(ctx, testCollectionName, testVectorField)
 		assert.Error(t, err)
 
-		mock.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			_, ok := raw.(*server.GetIndexBuildProgressRequest)
 			if !ok {
 				t.FailNow()
diff --git a/client/client_grpc_partition_test.go b/client/client_grpc_partition_test.go
index 1c96d2b..27e6d06 100644
--- a/client/client_grpc_partition_test.go
+++ b/client/client_grpc_partition_test.go
@@ -49,8 +49,8 @@ func TestGrpcClientCreatePartition(t *testing.T) {
 
 	partitionName := fmt.Sprintf("_part_%d", rand.Int())
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MHasPartition, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasPartition, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.HasPartitionRequest)
 		resp := &server.BoolResponse{}
 		if !ok {
@@ -73,8 +73,8 @@ func TestGrpcClientDropPartition(t *testing.T) {
 	partitionName := fmt.Sprintf("_part_%d", rand.Int())
 	ctx := context.Background()
 	c := testClient(ctx, t)
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, partitionName)) // injection has assertion of collName & parition name
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, partitionName)) // injection has assertion of collName & parition name
 	assert.Nil(t, c.DropPartition(ctx, testCollectionName, partitionName))
 }
 
@@ -82,8 +82,8 @@ func TestGrpcClientHasPartition(t *testing.T) {
 	partitionName := fmt.Sprintf("_part_%d", rand.Int())
 	ctx := context.Background()
 	c := testClient(ctx, t)
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partitionName)) // injection has assertion of collName & parition name
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, partitionName)) // injection has assertion of collName & parition name
 
 	r, err := c.HasPartition(ctx, testCollectionName, "_default_part")
 	assert.Nil(t, err)
@@ -149,7 +149,7 @@ func TestGrpcClientShowPartitions(t *testing.T) {
 		},
 	}
 	for _, tc := range cases {
-		mock.SetInjection(MShowPartitions, getPartitionsInterception(t, tc.collName, tc.partitions...))
+		mockServer.SetInjection(MShowPartitions, getPartitionsInterception(t, tc.collName, tc.partitions...))
 		r, err := c.ShowPartitions(ctx, tc.collName)
 		if tc.shouldSuccess {
 			assert.Nil(t, err)
@@ -170,8 +170,8 @@ func TestGrpcClientLoadPartitions(t *testing.T) {
 	ctx := context.Background()
 	c := testClient(ctx, t)
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, "_part1", "_part2", "_part3", "_part4"))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, "_part1", "_part2", "_part3", "_part4"))
 
 	type testCase struct {
 		collName      string
@@ -224,7 +224,7 @@ func TestGrpcClientLoadPartitions(t *testing.T) {
 		start := time.Now()
 		loadTime := rand.Intn(1500) + 100
 		loaded := false
-		mock.SetInjection(MShowPartitions, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowPartitions, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.ShowPartitionsRequest)
 			resp := &server.ShowPartitionsResponse{}
 			if !ok {
@@ -280,7 +280,7 @@ func TestGrpcClientLoadPartitions(t *testing.T) {
 		}
 
 		// paritions will not be loaded
-		mock.SetInjection(MShowPartitions, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowPartitions, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.ShowPartitionsRequest)
 			resp := &server.ShowPartitionsResponse{}
 			if !ok {
@@ -305,21 +305,21 @@ func TestGrpcClientLoadPartitions(t *testing.T) {
 		defer cancel()
 		assert.NotNil(t, c.LoadPartitions(quickCtx, tc.collName, tc.loadNames, false))
 
-		mock.SetInjection(MShowPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.ShowPartitionsResponse{}, errors.New("always fail")
 		})
-		defer mock.DelInjection(MShowPartitions)
+		defer mockServer.DelInjection(MShowPartitions)
 
 		err := c.LoadPartitions(ctx, tc.collName, tc.loadNames, false)
 		assert.NotNil(t, err)
 
-		mock.SetInjection(MLoadPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MLoadPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			return &common.Status{}, errors.New("has partition failed")
 		})
 		err = c.LoadPartitions(ctx, tc.collName, tc.loadNames, false)
 		assert.NotNil(t, err)
 
-		mock.SetInjection(MHasPartition, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MHasPartition, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.BoolResponse{}, errors.New("has partition failed")
 		})
 		err = c.LoadPartitions(ctx, tc.collName, tc.loadNames, false)
@@ -334,9 +334,9 @@ func TestGrpcClientReleasePartitions(t *testing.T) {
 	c := testClient(ctx, t)
 
 	parts := []string{"_part1", "_part2"}
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, "_part1", "_part2", "_part3", "_part4"))
-	mock.SetInjection(MReleasePartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, true, "_part1", "_part2", "_part3", "_part4"))
+	mockServer.SetInjection(MReleasePartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.ReleasePartitionsRequest)
 		if !ok {
 			return BadRequestStatus()
@@ -370,14 +370,14 @@ func TestGrpcShowPartitions(t *testing.T) {
 	}
 
 	t.Run("normal show partitions", func(t *testing.T) {
-		mock.SetInjection(MShowPartitions, getPartitionsInterception(t, testCollectionName, partitions...))
+		mockServer.SetInjection(MShowPartitions, getPartitionsInterception(t, testCollectionName, partitions...))
 		parts, err := c.ShowPartitions(ctx, testCollectionName)
 		assert.NoError(t, err)
 		assert.NotNil(t, parts)
 	})
 
 	t.Run("bad response", func(t *testing.T) {
-		mock.SetInjection(MShowPartitions, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowPartitions, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			resp := &server.ShowPartitionsResponse{}
 			resp.PartitionIDs = make([]int64, 0, len(partitions))
 			for _, part := range partitions {
@@ -392,15 +392,15 @@ func TestGrpcShowPartitions(t *testing.T) {
 	})
 
 	t.Run("Service error", func(t *testing.T) {
-		mock.SetInjection(MShowPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.ShowPartitionsResponse{}, errors.New("always fail")
 		})
-		defer mock.DelInjection(MShowPartitions)
+		defer mockServer.DelInjection(MShowPartitions)
 
 		_, err := c.ShowPartitions(ctx, testCollectionName)
 		assert.Error(t, err)
 
-		mock.SetInjection(MShowPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MShowPartitions, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			return &server.ShowPartitionsResponse{
 				Status: &common.Status{ErrorCode: common.ErrorCode_UnexpectedError},
 			}, nil
diff --git a/client/client_grpc_rg_test.go b/client/client_grpc_rg_test.go
new file mode 100644
index 0000000..bf2ac01
--- /dev/null
+++ b/client/client_grpc_rg_test.go
@@ -0,0 +1,423 @@
+// Copyright (C) 2019-2021 Zilliz. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software distributed under the License
+// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+// or implied. See the License for the specific language governing permissions and limitations under the License.
+
+package client
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	"math/rand"
+	"testing"
+
+	"github.com/stretchr/testify/mock"
+	"github.com/stretchr/testify/suite"
+
+	common "github.com/milvus-io/milvus-proto/go-api/commonpb"
+	server "github.com/milvus-io/milvus-proto/go-api/milvuspb"
+)
+
+type ResourceGroupSuite struct {
+	MockSuiteBase
+}
+
+func (s *ResourceGroupSuite) TestListResourceGroups() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().ListResourceGroups(mock.Anything, mock.AnythingOfType("*milvuspb.ListResourceGroupsRequest")).
+			Return(&server.ListResourceGroupsResponse{Status: &common.Status{}, ResourceGroups: rgs}, nil)
+
+		result, err := c.ListResourceGroups(ctx)
+		s.NoError(err)
+		s.ElementsMatch(rgs, result)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().ListResourceGroups(mock.Anything, mock.AnythingOfType("*milvuspb.ListResourceGroupsRequest")).
+			Return(nil, errors.New("mocked grpc error"))
+
+		_, err := c.ListResourceGroups(ctx)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().ListResourceGroups(mock.Anything, mock.AnythingOfType("*milvuspb.ListResourceGroupsRequest")).
+			Return(&server.ListResourceGroupsResponse{Status: &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}}, nil)
+
+		_, err := c.ListResourceGroups(ctx)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestCreateResourceGroup() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		rgName := randStr(10)
+
+		s.mock.EXPECT().CreateResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.CreateResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.CreateResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.CreateResourceGroup(ctx, rgName)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().CreateResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.CreateResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.CreateResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.CreateResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().CreateResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.CreateResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.CreateResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.CreateResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestDescribeResourceGroup() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		rgName := randStr(10)
+		capacity := rand.Int31n(5) + 1
+		available := rand.Int31n(capacity)
+
+		loadedReplica := make(map[string]int32)
+		l := rand.Intn(3) + 1
+		for i := 0; i < l; i++ {
+			loadedReplica[fmt.Sprintf("coll_%s", randStr(6))] = rand.Int31n(5) + 1
+		}
+		incomingNum := make(map[string]int32)
+		l = rand.Intn(3) + 1
+		for i := 0; i < l; i++ {
+			incomingNum[fmt.Sprintf("coll_%s", randStr(6))] = rand.Int31n(5) + 1
+		}
+		outgoingNum := make(map[string]int32)
+		l = rand.Intn(3) + 1
+		for i := 0; i < l; i++ {
+			outgoingNum[fmt.Sprintf("coll_%s", randStr(6))] = rand.Int31n(5) + 1
+		}
+
+		type testColl struct {
+			Name      string
+			Capacity  int32
+			Available int32
+		}
+		s.mock.EXPECT().DescribeResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DescribeResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Call.Return(func(_ context.Context, req *server.DescribeResourceGroupRequest) *server.DescribeResourceGroupResponse {
+
+			return &server.DescribeResourceGroupResponse{
+				Status: &common.Status{},
+				ResourceGroup: &server.ResourceGroup{
+					Name:             rgName,
+					Capacity:         capacity,
+					NumAvailableNode: available,
+					NumLoadedReplica: loadedReplica,
+					NumOutgoingNode:  outgoingNum,
+					NumIncomingNode:  incomingNum,
+				},
+			}
+		}, nil)
+
+		result, err := c.DescribeResourceGroup(ctx, rgName)
+		s.NoError(err)
+		s.Equal(rgName, result.Name)
+		s.Equal(capacity, result.Capacity)
+		s.Equal(available, result.AvailableNodesNumber)
+		s.InDeltaMapValues(loadedReplica, result.LoadedReplica, 0)
+		s.InDeltaMapValues(incomingNum, result.IncomingNodeNum, 0)
+		s.InDeltaMapValues(outgoingNum, result.OutgoingNodeNum, 0)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().DescribeResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DescribeResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		_, err := c.DescribeResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().DescribeResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DescribeResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DescribeResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&server.DescribeResourceGroupResponse{Status: &common.Status{ErrorCode: common.ErrorCode_UnexpectedError}}, nil)
+
+		_, err := c.DescribeResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestDropResourceGroup() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		rgName := randStr(10)
+
+		s.mock.EXPECT().DropResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DropResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DropResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.DropResourceGroup(ctx, rgName)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().DropResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DropResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DropResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.DropResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		rgName := randStr(10)
+
+		s.mock.EXPECT().DropResourceGroup(mock.Anything, mock.AnythingOfType("*milvuspb.DropResourceGroupRequest")).
+			Run(func(_ context.Context, req *server.DropResourceGroupRequest) {
+				s.Equal(rgName, req.GetResourceGroup())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.DropResourceGroup(ctx, rgName)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestTransferNodes() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		nodeNum := rand.Int31n(5) + 1
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().TransferNode(mock.Anything, mock.AnythingOfType("*milvuspb.TransferNodeRequest")).
+			Run(func(_ context.Context, req *server.TransferNodeRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(nodeNum, req.GetNumNode())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.TransferNode(ctx, sourceRg, targetRg, nodeNum)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		nodeNum := rand.Int31n(5) + 1
+
+		s.mock.EXPECT().TransferNode(mock.Anything, mock.AnythingOfType("*milvuspb.TransferNodeRequest")).
+			Run(func(_ context.Context, req *server.TransferNodeRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(nodeNum, req.GetNumNode())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.TransferNode(ctx, sourceRg, targetRg, nodeNum)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		nodeNum := rand.Int31n(5) + 1
+
+		s.mock.EXPECT().TransferNode(mock.Anything, mock.AnythingOfType("*milvuspb.TransferNodeRequest")).
+			Run(func(_ context.Context, req *server.TransferNodeRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(nodeNum, req.GetNumNode())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.TransferNode(ctx, sourceRg, targetRg, nodeNum)
+		s.Error(err)
+	})
+}
+
+func (s *ResourceGroupSuite) TestTransferReplica() {
+	c := s.client
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
+
+	s.Run("normal_run", func() {
+		defer s.resetMock()
+		collName := fmt.Sprintf("coll_%s", randStr(6))
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		replicaNum := rand.Int63n(5) + 1
+
+		rgs := make([]string, 0, 5)
+		for i := 0; i < 5; i++ {
+			rgs = append(rgs, randStr(10))
+		}
+
+		s.mock.EXPECT().TransferReplica(mock.Anything, mock.AnythingOfType("*milvuspb.TransferReplicaRequest")).
+			Run(func(_ context.Context, req *server.TransferReplicaRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(replicaNum, req.GetNumReplica())
+			}).
+			Return(&common.Status{}, nil)
+
+		err := c.TransferReplica(ctx, sourceRg, targetRg, collName, replicaNum)
+		s.NoError(err)
+	})
+
+	s.Run("request_fails", func() {
+		defer s.resetMock()
+
+		collName := fmt.Sprintf("coll_%s", randStr(6))
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		replicaNum := rand.Int63n(5) + 1
+
+		s.mock.EXPECT().TransferReplica(mock.Anything, mock.AnythingOfType("*milvuspb.TransferReplicaRequest")).
+			Run(func(_ context.Context, req *server.TransferReplicaRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(replicaNum, req.GetNumReplica())
+			}).
+			Return(nil, errors.New("mocked grpc error"))
+
+		err := c.TransferReplica(ctx, sourceRg, targetRg, collName, replicaNum)
+		s.Error(err)
+	})
+
+	s.Run("server_return_err", func() {
+		defer s.resetMock()
+
+		collName := fmt.Sprintf("coll_%s", randStr(6))
+		sourceRg := randStr(10)
+		targetRg := randStr(10)
+		replicaNum := rand.Int63n(5) + 1
+
+		s.mock.EXPECT().TransferReplica(mock.Anything, mock.AnythingOfType("*milvuspb.TransferReplicaRequest")).
+			Run(func(_ context.Context, req *server.TransferReplicaRequest) {
+				s.Equal(sourceRg, req.GetSourceResourceGroup())
+				s.Equal(targetRg, req.GetTargetResourceGroup())
+				s.Equal(replicaNum, req.GetNumReplica())
+			}).
+			Return(&common.Status{ErrorCode: common.ErrorCode_UnexpectedError}, nil)
+
+		err := c.TransferReplica(ctx, sourceRg, targetRg, collName, replicaNum)
+		s.Error(err)
+	})
+}
+
+func TestResourceGroupSuite(t *testing.T) {
+	suite.Run(t, new(ResourceGroupSuite))
+}
diff --git a/client/client_grpc_row_test.go b/client/client_grpc_row_test.go
index c484c82..fcef937 100644
--- a/client/client_grpc_row_test.go
+++ b/client/client_grpc_row_test.go
@@ -30,9 +30,9 @@ func TestCreateCollectionByRow(t *testing.T) {
 		Vector []float32 `milvus:"dim:4"`
 	}
 	t.Run("Test normal creation", func(t *testing.T) {
-		mock.DelInjection(MHasCollection)
+		mockServer.DelInjection(MHasCollection)
 		shardsNum := int32(1)
-		mock.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(ctx context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateCollectionRequest)
 			if !ok {
 				return &common.Status{ErrorCode: common.ErrorCode_IllegalArgument}, errors.New("illegal request type")
@@ -52,7 +52,7 @@ func TestCreateCollectionByRow(t *testing.T) {
 	t.Run("Invalid cases", func(t *testing.T) {
 		//Duplicated
 		m := make(map[string]struct{})
-		mock.SetInjection(MCreateCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MCreateCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.CreateCollectionRequest)
 			if !ok {
 				return BadRequestStatus()
@@ -61,7 +61,7 @@ func TestCreateCollectionByRow(t *testing.T) {
 
 			return SuccessStatus()
 		})
-		mock.SetInjection(MHasCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+		mockServer.SetInjection(MHasCollection, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 			req, ok := raw.(*server.HasCollectionRequest)
 			resp := &server.BoolResponse{}
 			if !ok {
@@ -91,19 +91,19 @@ func TestInsertByRows(t *testing.T) {
 	c := testClient(ctx, t)
 
 	t.Run("test create failure due to meta", func(t *testing.T) {
-		mock.DelInjection(MHasCollection) // collection does not exist
+		mockServer.DelInjection(MHasCollection) // collection does not exist
 		ids, err := c.InsertByRows(ctx, testCollectionName, "", []entity.Row{})
 		assert.Nil(t, ids)
 		assert.NotNil(t, err)
 
 		// partition not exists
-		mock.SetInjection(MHasCollection, hasCollectionDefault)
+		mockServer.SetInjection(MHasCollection, hasCollectionDefault)
 		ids, err = c.InsertByRows(ctx, testCollectionName, "_part_not_exists", []entity.Row{})
 		assert.Nil(t, ids)
 		assert.NotNil(t, err)
 
 		// field not in collection
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 		type ExtraFieldRow struct {
 			entity.RowBase
 			Int64      int64 `milvus:"primary_key"`
@@ -115,7 +115,7 @@ func TestInsertByRows(t *testing.T) {
 		assert.NotNil(t, err)
 
 		// field type not match
-		mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+		mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 		type OtherFieldRow struct {
 			entity.RowBase
 			Int64  int32     `milvus:"primary_key;name:int64"`
@@ -155,11 +155,11 @@ func TestInsertByRows(t *testing.T) {
 		t.Log(err.Error())
 	})
 
-	mock.SetInjection(MHasCollection, hasCollectionDefault)
-	mock.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
+	mockServer.SetInjection(MHasCollection, hasCollectionDefault)
+	mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema()))
 
 	vector := generateFloatVector(4096, testVectorDim)
-	mock.SetInjection(MInsert, func(_ context.Context, raw proto.Message) (proto.Message, error) {
+	mockServer.SetInjection(MInsert, func(_ context.Context, raw proto.Message) (proto.Message, error) {
 		req, ok := raw.(*server.InsertRequest)
 		resp := &server.MutationResult{}
 		if !ok {
diff --git a/client/client_test.go b/client/client_test.go
index 4db7a26..42c547d 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -30,8 +30,8 @@ const (
 )
 
 var (
-	lis  *bufconn.Listener
-	mock *MockServer
+	lis        *bufconn.Listener
+	mockServer *MockServer
 )
 
 const (
@@ -111,10 +111,10 @@ func TestMain(m *testing.M) {
 	rand.Seed(time.Now().Unix())
 	lis = bufconn.Listen(bufSize)
 	s := grpc.NewServer()
-	mock = &MockServer{
+	mockServer = &MockServer{
 		Injections: make(map[ServiceMethod]TestInjection),
 	}
-	server.RegisterMilvusServiceServer(s, mock)
+	server.RegisterMilvusServiceServer(s, mockServer)
 	go func() {
 		if err := s.Serve(lis); err != nil {
 			log.Fatalf("Server exited with error: %v", err)
@@ -395,3 +395,16 @@ func TestClient_parseURI(t *testing.T) {
 		assert.Nil(t, err)
 	})
 }
+
+var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
+
+func randStr(n int) string {
+	sb := strings.Builder{}
+	sb.Grow(n)
+
+	for i := 0; i < n; i++ {
+		sb.WriteRune(letters[rand.Intn(len(letters))])
+	}
+
+	return sb.String()
+}
diff --git a/test/testcases/main_test.go b/test/testcases/main_test.go
index 9b6cb53..5275155 100644
--- a/test/testcases/main_test.go
+++ b/test/testcases/main_test.go
@@ -35,10 +35,6 @@ func teardown() {
 		log.Fatalf("teardown failed to connect milvus with error %v", err)
 	}
 	defer mc.Close()
-	collections, _ := mc.ListCollections(ctx)
-	for _, collection := range collections {
-		mc.DropCollection(ctx, collection.Name)
-	}
 }
 
 //