diff --git a/test/testcases/database_test.go b/test/testcases/database_test.go index ee5abf1f..e4ed7acc 100644 --- a/test/testcases/database_test.go +++ b/test/testcases/database_test.go @@ -160,7 +160,7 @@ func TestDropDb(t *testing.T) { // verify current db _, err = mc.ListCollections(ctx) - common.CheckErr(t, err, false, fmt.Sprintf("database=%s: database not found", dbName)) + common.CheckErr(t, err, false, fmt.Sprintf("database not found[database=%s]", dbName)) // using default db and verify collections mc.UsingDatabase(ctx, common.DefaultDb) @@ -195,7 +195,7 @@ func TestUsingDb(t *testing.T) { // using not existed db dbName := common.GenRandomString(4) err := mc.UsingDatabase(ctx, dbName) - common.CheckErr(t, err, false, fmt.Sprintf("connect fail, database=%s: database not found", dbName)) + common.CheckErr(t, err, false, fmt.Sprintf("connect fail, database not found[database=%s]", dbName)) // using empty db err = mc.UsingDatabase(ctx, "") diff --git a/test/testcases/index_test.go b/test/testcases/index_test.go index fbd73333..f2759c2b 100644 --- a/test/testcases/index_test.go +++ b/test/testcases/index_test.go @@ -118,10 +118,10 @@ func TestCreateIndexArrayField(t *testing.T) { if field.DataType == entity.FieldTypeArray { // create scalar index err := mc.CreateIndex(ctx, collName, field.Name, scalarIdx, false, client.WithIndexName("scalar_index")) - common.CheckErr(t, err, false, "create index on Array field: invalid parameter") + common.CheckErr(t, err, false, "create index on json field is not supported: invalid parameter") // create vector index err1 := mc.CreateIndex(ctx, collName, field.Name, vectorIdx, false, client.WithIndexName("vector_index")) - common.CheckErr(t, err1, false, "create index on Array field: invalid parameter") + common.CheckErr(t, err1, false, "create index on json field is not supported: invalid parameter") } } } diff --git a/test/testcases/insert_test.go b/test/testcases/insert_test.go index 3c94a1dd..30d157fa 100644 --- a/test/testcases/insert_test.go +++ b/test/testcases/insert_test.go @@ -83,7 +83,7 @@ func TestInsertAutoIdPkData(t *testing.T) { // insert pkColumn, floatColumn, vecColumn := common.GenDefaultColumnData(0, common.DefaultNb, common.DefaultDim) _, errInsert := mc.Insert(ctx, collName, "", pkColumn, floatColumn, vecColumn) - common.CheckErr(t, errInsert, false, "the length of passed fields is equal to needed: expected=2, actual=3: invalid parameter") + common.CheckErr(t, errInsert, false, "the number of fields is less than needed") // flush and check row count errFlush := mc.Flush(ctx, collName, false) diff --git a/test/testcases/resource_group_test.go b/test/testcases/resource_group_test.go index 42e3df57..bb563553 100644 --- a/test/testcases/resource_group_test.go +++ b/test/testcases/resource_group_test.go @@ -260,8 +260,8 @@ func TestTransferInvalidNodes(t *testing.T) { errMsg string } invalidNodes := []invalidNodesStruct{ - {nodesNum: 0, errMsg: "expected=NumNode > 0, actual=invalid NumNode"}, - {nodesNum: -1, errMsg: "expected=NumNode > 0, actual=invalid NumNode"}, + {nodesNum: 0, errMsg: "invalid parameter[expected=NumNode > 0][actual=invalid NumNode 0]"}, + {nodesNum: -1, errMsg: "invalid parameter[expected=NumNode > 0][actual=invalid NumNode -1]"}, {nodesNum: 99, errMsg: "nodes not enough"}, } // transfer node @@ -412,8 +412,8 @@ func TestTransferReplicaInvalidReplicaNumber(t *testing.T) { errMsg string } invalidReplicas := []invalidReplicasStruct{ - {replicaNumber: 0, errMsg: "expected=NumReplica > 0, actual=invalid NumReplica"}, - {replicaNumber: -1, errMsg: "expected=NumReplica > 0, actual=invalid NumReplica"}, + {replicaNumber: 0, errMsg: "invalid parameter[expected=NumReplica > 0][actual=invalid NumReplica 0]"}, + {replicaNumber: -1, errMsg: "invalid parameter[expected=NumReplica > 0][actual=invalid NumReplica -1]"}, {replicaNumber: 1, errMsg: "only found [0] replicas in source resource group"}, } diff --git a/test/testcases/upsert_test.go b/test/testcases/upsert_test.go index 2d167f3b..9443b250 100644 --- a/test/testcases/upsert_test.go +++ b/test/testcases/upsert_test.go @@ -115,7 +115,7 @@ func TestUpsertAutoID(t *testing.T) { // upsert with pks pkColumn := entity.NewColumnInt64(common.DefaultIntFieldName, ids.(*entity.ColumnInt64).Data()[:100]) _, err = mc.Upsert(ctx, collName, "", pkColumn, floatColumn1, vecColumn1) - common.CheckErr(t, err, false, "the length of passed fields is equal to needed") + common.CheckErr(t, err, false, "the number of fields is less than needed") } func TestUpsertVarcharPk(t *testing.T) {