Skip to content

Commit

Permalink
test: update ci server image to 2.4 and some cases
Browse files Browse the repository at this point in the history
Signed-off-by: ThreadDao <[email protected]>
  • Loading branch information
ThreadDao committed Sep 13, 2024
1 parent 45e4e60 commit 5463d90
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test CI
on:
push:
branches:
- master
- v2.4.x
pull_request:
paths:
- 'common/**'
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/testcases/groupby_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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,
Expand Down Expand Up @@ -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, 5, 1000, indexHnsw, false)

// hybrid search with groupBy field
sp, _ := entity.NewIndexHNSWSearchParam(20)
Expand Down
1 change: 1 addition & 0 deletions test/testcases/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
48 changes: 48 additions & 0 deletions test/testcases/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions test/testcases/load_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 5463d90

Please sign in to comment.