Skip to content

Commit

Permalink
Fix error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia committed Oct 23, 2024
1 parent 7f209fb commit b9509db
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/testcases/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,5 +701,5 @@ func TestGetStaticsCollectionNotExisted(t *testing.T) {

// flush and check row count
_, errStatist := mc.GetCollectionStatistics(ctx, "collName")
common.CheckErr(t, errStatist, false, "collection not found")
common.CheckErr(t, errStatist, false, "can't find collection")
}
2 changes: 1 addition & 1 deletion test/testcases/compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func TestCompactCollectionNotExist(t *testing.T) {
mc := createMilvusClient(ctx, t)

_, err := mc.Compact(ctx, "coll", 0)
common.CheckErr(t, err, false, "collection not found")
common.CheckErr(t, err, false, "can't find collection")
}

// test compact empty collection
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestDeleteNotExistCollection(t *testing.T) {
// flush and check row count
deleteIds := entity.NewColumnInt64(common.DefaultIntFieldName, []int64{0, 1})
errDelete := mc.DeleteByPks(ctx, "collName", common.DefaultPartition, deleteIds)
common.CheckErr(t, errDelete, false, "collection not found")
common.CheckErr(t, errDelete, false, "can't find collection")
}

// test delete from an not exist partition
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/flush_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestFlushNotExistedCollection(t *testing.T) {

// flush and check row count
errFlush := mc.Flush(ctx, "collName", false)
common.CheckErr(t, errFlush, false, "collection not found")
common.CheckErr(t, errFlush, false, "can't find collection")
}

// test flush async
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ func TestCreateIndexNotExistCollName(t *testing.T) {
// create index
idx, _ := entity.NewIndexHNSW(entity.L2, 8, 96)
err := mc.CreateIndex(ctx, "haha", common.DefaultFloatVecFieldName, idx, false)
common.CheckErr(t, err, false, "collection not found")
common.CheckErr(t, err, false, "can't find collection")
}

func TestCreateIndexNotExistField(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/load_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestLoadCollectionNotExist(t *testing.T) {

// Load collection
errLoad := mc.LoadCollection(ctx, "collName", false)
common.CheckErr(t, errLoad, false, "exist")
common.CheckErr(t, errLoad, false, "collection not found")
}

// test load collection async
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func TestTransferReplicaNotExistedCollection(t *testing.T) {

// transfer replica
errTransfer := mc.TransferReplica(ctx, common.DefaultRgName, rgName, common.GenRandomString(3), 1)
common.CheckErr(t, errTransfer, false, "collection not found")
common.CheckErr(t, errTransfer, false, "can't find collection")
}

// test transfer replicas with invalid replica number
Expand Down

0 comments on commit b9509db

Please sign in to comment.