Skip to content

Commit

Permalink
Update L3 cases and nightly qn replicas (#547) (#558)
Browse files Browse the repository at this point in the history
Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
  • Loading branch information
ThreadDao authored Aug 18, 2023
1 parent 0c4a500 commit a492306
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ci/milvus-operator/milvus-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ spec:
components:
image: ${IMAGE_REPO}:${IMAGE_TAG}
queryNode:
replicas: 2
replicas: 4
dataNode:
replicas: 1
indexNode:
Expand Down
35 changes: 31 additions & 4 deletions test/testcases/resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ const configQnNodes = int32(4)
const newRgNode = int32(2)

func resetRgs(t *testing.T, ctx context.Context, mc *base.MilvusClient) {
// release and drop all collections
collections, _ := mc.ListCollections(ctx)
for _, coll := range collections {
mc.ReleaseCollection(ctx, coll.Name)
err := mc.DropCollection(ctx, coll.Name)
common.CheckErr(t, err, true)
}

// reset resource groups
rgs, errList := mc.ListResourceGroups(ctx)
common.CheckErr(t, errList, true)
Expand Down Expand Up @@ -252,9 +260,9 @@ func TestTransferInvalidNodes(t *testing.T) {
errMsg string
}
invalidNodes := []invalidNodesStruct{
{nodesNum: 0, errMsg: "transfer node num can't be"},
{nodesNum: -1, errMsg: "transfer node num can't be"},
{nodesNum: 99, errMsg: "failed to transfer node between resource group, err=nodes not enough"},
{nodesNum: 0, errMsg: "transfer node num can't be [0]"},
{nodesNum: -1, errMsg: "transfer node num can't be [-1]"},
{nodesNum: 99, errMsg: "nodes not enough"},
}
// transfer node
for _, invalidNode := range invalidNodes {
Expand Down Expand Up @@ -343,8 +351,27 @@ func TestTransferReplicas(t *testing.T) {
}
common.CheckResourceGroup(t, newRg, expRg)

// drop new rg that loaded collection
err := mc.DropResourceGroup(ctx, rgName)
common.CheckErr(t, err, false, "some replicas still loaded in resource group")

// search
// todo
sp, err := entity.NewIndexHNSWSearchParam(74)
searchRes, _ := mc.Search(
ctx, collName,
[]string{common.DefaultPartition},
"",
[]string{common.DefaultFloatFieldName},
common.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector),
common.DefaultFloatVecFieldName,
entity.L2,
common.DefaultTopK,
sp,
)
// check search result contains search vector, which from all partitions
common.CheckErr(t, err, true)
common.CheckSearchResult(t, searchRes, common.DefaultNq, common.DefaultTopK)

}

// test transfer replica of not existed collection
Expand Down

0 comments on commit a492306

Please sign in to comment.