From b9509db8a6111ea7edfe0a475b195c419910acc0 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Wed, 23 Oct 2024 14:13:28 +0800 Subject: [PATCH] Fix error messages Signed-off-by: Congqi Xia --- test/testcases/collection_test.go | 2 +- test/testcases/compact_test.go | 2 +- test/testcases/delete_test.go | 2 +- test/testcases/flush_test.go | 2 +- test/testcases/index_test.go | 2 +- test/testcases/load_release_test.go | 2 +- test/testcases/resource_group_test.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/testcases/collection_test.go b/test/testcases/collection_test.go index 4311f56f..164acacc 100644 --- a/test/testcases/collection_test.go +++ b/test/testcases/collection_test.go @@ -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") } diff --git a/test/testcases/compact_test.go b/test/testcases/compact_test.go index a54600a1..6ee7b0e6 100644 --- a/test/testcases/compact_test.go +++ b/test/testcases/compact_test.go @@ -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 diff --git a/test/testcases/delete_test.go b/test/testcases/delete_test.go index a7bc2c4b..7a06965c 100644 --- a/test/testcases/delete_test.go +++ b/test/testcases/delete_test.go @@ -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 diff --git a/test/testcases/flush_test.go b/test/testcases/flush_test.go index 15ae25f9..f8250074 100644 --- a/test/testcases/flush_test.go +++ b/test/testcases/flush_test.go @@ -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 diff --git a/test/testcases/index_test.go b/test/testcases/index_test.go index 11c1c1e7..227818fd 100644 --- a/test/testcases/index_test.go +++ b/test/testcases/index_test.go @@ -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) { diff --git a/test/testcases/load_release_test.go b/test/testcases/load_release_test.go index 4cd62cb2..389ac1b4 100644 --- a/test/testcases/load_release_test.go +++ b/test/testcases/load_release_test.go @@ -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 diff --git a/test/testcases/resource_group_test.go b/test/testcases/resource_group_test.go index 6c3cf92c..d69aa9c1 100644 --- a/test/testcases/resource_group_test.go +++ b/test/testcases/resource_group_test.go @@ -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