From 65e203332a96fcaa78fa3c88f2bd5ebefddba00b Mon Sep 17 00:00:00 2001 From: ThreadDao Date: Mon, 9 Sep 2024 20:11:16 +0800 Subject: [PATCH] test: update ci server image to 2.4 and some cases Signed-off-by: ThreadDao --- .github/workflows/test-ci.yaml | 6 ++-- test/testcases/groupby_search_test.go | 6 ++-- test/testcases/index_test.go | 1 + test/testcases/insert_test.go | 48 +++++++++++++++++++++++++++ test/testcases/load_release_test.go | 3 ++ 5 files changed, 58 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-ci.yaml b/.github/workflows/test-ci.yaml index e3310277..a1daf912 100644 --- a/.github/workflows/test-ci.yaml +++ b/.github/workflows/test-ci.yaml @@ -2,7 +2,7 @@ name: Test CI on: push: branches: - - master + - v2.4.x pull_request: paths: - 'common/**' @@ -22,9 +22,9 @@ jobs: mode: [standalone, cluster] env: IMAGE_REPO: "milvusdb/milvus" - TAG_PREFIX: "master-" + TAG_PREFIX: "2.4-" RELEASE_NAME: "go-test" - IMAGE_TAG: "master-latest" + IMAGE_TAG: "2.4-latest" QA_NAMESPACE: "qa" steps: - name: Checkout code diff --git a/test/testcases/groupby_search_test.go b/test/testcases/groupby_search_test.go index 92e58290..c2d4b665 100644 --- a/test/testcases/groupby_search_test.go +++ b/test/testcases/groupby_search_test.go @@ -24,11 +24,13 @@ func genGroupByVectorIndex(metricType entity.MetricType) []entity.Index { idxFlat, _ := entity.NewIndexFlat(metricType) idxIvfFlat, _ := entity.NewIndexIvfFlat(metricType, nlist) idxHnsw, _ := entity.NewIndexHNSW(metricType, 8, 96) + idxIvfSq8, _ := entity.NewIndexIvfSQ8(metricType, 128) allFloatIndex := []entity.Index{ idxFlat, idxIvfFlat, idxHnsw, + idxIvfSq8, } return allFloatIndex } @@ -47,12 +49,10 @@ func genGroupByBinaryIndex(metricType entity.MetricType) []entity.Index { } func genUnsupportedFloatGroupByIndex() []entity.Index { - // idxIvfSq8, _ := entity.NewIndexIvfSQ8(entity.L2, 128) idxIvfPq, _ := entity.NewIndexIvfPQ(entity.L2, 128, 16, 8) idxScann, _ := entity.NewIndexSCANN(entity.L2, 16, false) idxDiskAnn, _ := entity.NewIndexDISKANN(entity.L2) return []entity.Index{ - // idxIvfSq8, idxIvfPq, idxScann, idxDiskAnn, @@ -467,7 +467,7 @@ func TestSearchGroupByRangeSearch(t *testing.T) { func TestSearchGroupByHybridSearch(t *testing.T) { // prepare data indexHnsw, _ := entity.NewIndexHNSW(entity.L2, 8, 96) - mc, ctx, collName := prepareDataForGroupBySearch(t, 10, 1000, indexHnsw, false) + mc, ctx, collName := prepareDataForGroupBySearch(t, 6, 1000, indexHnsw, false) // hybrid search with groupBy field sp, _ := entity.NewIndexHNSWSearchParam(20) diff --git a/test/testcases/index_test.go b/test/testcases/index_test.go index b498c6f8..d23911f7 100644 --- a/test/testcases/index_test.go +++ b/test/testcases/index_test.go @@ -398,6 +398,7 @@ func TestCreateInvertedScalarIndex(t *testing.T) { // create Bitmap index for all scalar fields func TestCreateBitmapScalarIndex(t *testing.T) { + t.Skip("waiting for bitmap pr cherry-pick") ctx := createContext(t, time.Second*common.DefaultTimeout*2) // connect mc := createMilvusClient(ctx, t) diff --git a/test/testcases/insert_test.go b/test/testcases/insert_test.go index b35375a3..f987e82c 100644 --- a/test/testcases/insert_test.go +++ b/test/testcases/insert_test.go @@ -415,6 +415,54 @@ func TestInsertDynamicFieldData(t *testing.T) { } +// dynamic field name is same as other field name +func TestInsertRepeatedDynamicField(t *testing.T) { + t.Skip("https://github.com/milvus-io/milvus-sdk-go/issues/818") + ctx := createContext(t, time.Second*common.DefaultTimeout) + + // connect + mc := createMilvusClient(ctx, t) + nb := 1000 + + // create collection enable dynamic field + schema := common.GenSchema(common.GenRandomString(6), false, common.GenDefaultFields(false), common.WithEnableDynamicField(true)) + createCustomerCollection(ctx, t, mc, schema, 1) + + // insert column with repeated dynamic field name + intColumn, floatColumn, vecColumn := common.GenDefaultColumnData(0, nb, common.DefaultDim) + dynamicColumn := common.GenColumnData(nb, nb, entity.FieldTypeInt64, common.DefaultFloatFieldName) + _, errInsert := mc.Insert(ctx, schema.CollectionName, "", intColumn, floatColumn, vecColumn, dynamicColumn) + common.CheckErr(t, errInsert, false, "duplicated column float found") + + // insert rows with repeated dynamic field name + type dynamicRows struct { + Float float32 `json:"float" milvus:"name:float"` + } + + type dataRows struct { + Int64 int64 `json:"int64" milvus:"name:int64"` + Float float32 `json:"float" milvus:"name:float"` + FloatVec []float32 `json:"floatVec" milvus:"name:floatVec"` + Dynamic dynamicRows `json:"dynamic" milvus:"name:dynamic"` + } + rows := make([]interface{}, 0, 100) + for i := 0; i < 100; i++ { + dynamic := dynamicRows{ + Float: 0.0, + } + row := dataRows{ + Int64: int64(i), + Float: float32(i), + FloatVec: common.GenFloatVector(common.DefaultDim), + Dynamic: dynamic, + } + rows = append(rows, row) + } + + _, err := mc.InsertRows(context.Background(), schema.CollectionName, "", rows) + common.CheckErr(t, err, false, "some error message") +} + // test insert array column with empty data func TestInsertEmptyArray(t *testing.T) { ctx := createContext(t, time.Second*common.DefaultTimeout) diff --git a/test/testcases/load_release_test.go b/test/testcases/load_release_test.go index 05752eeb..2bc7d415 100644 --- a/test/testcases/load_release_test.go +++ b/test/testcases/load_release_test.go @@ -793,6 +793,7 @@ func TestMmapScalarInvertedIndex(t *testing.T) { // test mmap scalar index: bitmap func TestMmapScalarBitmapIndex(t *testing.T) { + t.Skip("waiting for bitmap pr cherry-pick") // vector index ctx := createContext(t, time.Second*common.DefaultTimeout*2) // connect @@ -927,6 +928,7 @@ func TestMmapIndexUnsupported(t *testing.T) { // test mmap unsupported index: DiskANN, GPU-class func TestMmapScalarAutoIndex(t *testing.T) { + t.Skip("waiting for bitmap pr cherry-pick") ctx := createContext(t, time.Second*common.DefaultTimeout*2) // connect mc := createMilvusClient(ctx, t) @@ -951,6 +953,7 @@ func TestMmapScalarAutoIndex(t *testing.T) { } func TestAlterIndexMmapUnsupportedIndex(t *testing.T) { + t.Skip("waiting for bitmap pr cherry-pick") ctx := createContext(t, time.Second*common.DefaultTimeout*2) // connect mc := createMilvusClient(ctx, t)