Skip to content

Commit

Permalink
update cases with issue fixed
Browse files Browse the repository at this point in the history
Signed-off-by: ThreadDao <[email protected]>
  • Loading branch information
ThreadDao committed Feb 10, 2025
1 parent f760584 commit e190d33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 1 addition & 5 deletions tests/go_client/testcases/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ func TestDatabase(t *testing.T) {
common.CheckErr(t, errList, true)
require.Containsf(t, dbs, dbName1, fmt.Sprintf("%s db not in dbs: %v", dbName1, dbs))

// new client with db1 -> using db
// new client with db1
clientDB1 := createMilvusClient(ctx, t, &client.ClientConfig{Address: *addr, DBName: dbName1})
t.Log("https://github.com/milvus-io/milvus/issues/34137")
err = clientDB1.UseDatabase(ctx, client.NewUseDatabaseOption(dbName1))
common.CheckErr(t, err, true)

// create collections -> verify collections contains
_, db1Col1 := hp.CollPrepare.CreateCollection(ctx, t, clientDB1, hp.NewCreateCollectionParams(hp.Int64Vec), hp.TNewFieldsOption(), hp.TNewSchemaOption())
Expand Down Expand Up @@ -223,7 +220,6 @@ func TestUsingDb(t *testing.T) {
}

func TestClientWithDb(t *testing.T) {
t.Skip("https://github.com/milvus-io/milvus/issues/34137")
teardownSuite := teardownTest(t)
defer teardownSuite(t)

Expand Down
12 changes: 5 additions & 7 deletions tests/go_client/testcases/hybrid_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ func TestHybridSearchDefault(t *testing.T) {
queryVec1 := hp.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector)
queryVec2 := hp.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector)

t.Log("https://github.com/milvus-io/milvus/issues/39559")
annReq1 := client.NewAnnRequest(common.DefaultFloatVecFieldName, common.DefaultLimit, queryVec1...)
// annReq1 := client.NewAnnRequest(common.DefaultFloatVecFieldName, common.DefaultLimit, queryVec1...).WithSearchParam("ef", "100")
annReq1 := client.NewAnnRequest(common.DefaultFloatVecFieldName, common.DefaultLimit, queryVec1...).WithSearchParam("ef", "100")
annReq2 := client.NewAnnRequest(common.DefaultFloatVecFieldName, common.DefaultLimit, queryVec2...)

searchRes, errSearch := mc.HybridSearch(ctx, client.NewHybridSearchOption(schema.CollectionName, common.DefaultLimit, annReq1, annReq2).WithOutputFields("*"))
Expand Down Expand Up @@ -167,6 +165,7 @@ func TestHybridSearchMultiVectorsDefault(t *testing.T) {
// invalid fieldName: not exist
// invalid metric type: mismatch
func TestHybridSearchInvalidParams(t *testing.T) {
t.Parallel()
ctx := hp.CreateContext(t, time.Second*common.DefaultTimeout)
mc := createDefaultMilvusClient(ctx, t)

Expand Down Expand Up @@ -214,10 +213,9 @@ func TestHybridSearchInvalidParams(t *testing.T) {
common.CheckErr(t, errField, false, "failed to get field schema by name: fieldName(a) not found")

// invalid metric type: mismatch
t.Log("https://github.com/milvus-io/milvus/issues/39559")
/* annReq4 := client.NewAnnRequest(common.DefaultFloatVecFieldName, common.DefaultLimit, queryVec1...).WithSearchParam("ef", "100")
annReq4 := client.NewAnnRequest(common.DefaultFloatVecFieldName, common.DefaultLimit, queryVec1...).WithSearchParam("metric_type", "L2")
_, errMetric := mc.HybridSearch(ctx, client.NewHybridSearchOption(schema.CollectionName, common.DefaultLimit, annReq4))
common.CheckErr(t, errMetric, false, "metric type not match: invalid parameter") */
common.CheckErr(t, errMetric, false, "metric type not match: invalid parameter")
}

// vector type mismatch: vectors: float32, queryVec: binary
Expand Down Expand Up @@ -301,7 +299,7 @@ func TestHybridSearchMultiVectorsPagination(t *testing.T) {

// hybrid search Pagination -> verify success
func TestHybridSearchMultiVectorsRangeSearch(t *testing.T) {
t.Skip("https://github.com/milvus-io/milvus/issues/39559")
t.Parallel()
ctx := hp.CreateContext(t, time.Second*common.DefaultTimeout)
mc := createDefaultMilvusClient(ctx, t)

Expand Down

0 comments on commit e190d33

Please sign in to comment.