Skip to content

Commit

Permalink
test: update cases for index describe and upsert with autoID (milvus-…
Browse files Browse the repository at this point in the history
…io#35191)

issue: milvus-io#33419

---------

Signed-off-by: ThreadDao <[email protected]>
  • Loading branch information
ThreadDao authored Aug 5, 2024
1 parent 1db0999 commit a62118c
Show file tree
Hide file tree
Showing 16 changed files with 255 additions and 165 deletions.
1 change: 1 addition & 0 deletions .github/workflows/code-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- 'cmd/**'
- 'build/**'
- 'tests/integration/**'
- 'tests/go_client/**'
- '.github/workflows/code-checker.yaml'
- '.env'
- docker-compose.yml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'cmd/**'
- 'build/**'
- 'tests/integration/**'
- 'tests/go_client/**'
- '.github/workflows/mac.yaml'
- '.env'
- docker-compose.yml
Expand Down
63 changes: 31 additions & 32 deletions tests/go_client/base/milvus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc"

clientv2 "github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/entity"
"github.com/milvus-io/milvus/client/v2/index"
"github.com/milvus-io/milvus/pkg/log"
)

Expand Down Expand Up @@ -58,12 +57,12 @@ func LoggingUnaryInterceptor() grpc.UnaryClientInterceptor {
}

type MilvusClient struct {
mClient *clientv2.Client
mClient *client.Client
}

func NewMilvusClient(ctx context.Context, cfg *clientv2.ClientConfig) (*MilvusClient, error) {
func NewMilvusClient(ctx context.Context, cfg *client.ClientConfig) (*MilvusClient, error) {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithUnaryInterceptor(LoggingUnaryInterceptor()))
mClient, err := clientv2.New(ctx, cfg)
mClient, err := client.New(ctx, cfg)
return &MilvusClient{
mClient,
}, err
Expand All @@ -77,123 +76,123 @@ func (mc *MilvusClient) Close(ctx context.Context) error {
// -- database --

// UsingDatabase list all database in milvus cluster.
func (mc *MilvusClient) UsingDatabase(ctx context.Context, option clientv2.UsingDatabaseOption) error {
func (mc *MilvusClient) UsingDatabase(ctx context.Context, option client.UsingDatabaseOption) error {
err := mc.mClient.UsingDatabase(ctx, option)
return err
}

// ListDatabases list all database in milvus cluster.
func (mc *MilvusClient) ListDatabases(ctx context.Context, option clientv2.ListDatabaseOption, callOptions ...grpc.CallOption) ([]string, error) {
func (mc *MilvusClient) ListDatabases(ctx context.Context, option client.ListDatabaseOption, callOptions ...grpc.CallOption) ([]string, error) {
databaseNames, err := mc.mClient.ListDatabase(ctx, option, callOptions...)
return databaseNames, err
}

// CreateDatabase create database with the given name.
func (mc *MilvusClient) CreateDatabase(ctx context.Context, option clientv2.CreateDatabaseOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) CreateDatabase(ctx context.Context, option client.CreateDatabaseOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.CreateDatabase(ctx, option, callOptions...)
return err
}

// DropDatabase drop database with the given db name.
func (mc *MilvusClient) DropDatabase(ctx context.Context, option clientv2.DropDatabaseOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) DropDatabase(ctx context.Context, option client.DropDatabaseOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.DropDatabase(ctx, option, callOptions...)
return err
}

// -- collection --

// CreateCollection Create Collection
func (mc *MilvusClient) CreateCollection(ctx context.Context, option clientv2.CreateCollectionOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) CreateCollection(ctx context.Context, option client.CreateCollectionOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.CreateCollection(ctx, option, callOptions...)
return err
}

// ListCollections Create Collection
func (mc *MilvusClient) ListCollections(ctx context.Context, option clientv2.ListCollectionOption, callOptions ...grpc.CallOption) ([]string, error) {
func (mc *MilvusClient) ListCollections(ctx context.Context, option client.ListCollectionOption, callOptions ...grpc.CallOption) ([]string, error) {
collectionNames, err := mc.mClient.ListCollections(ctx, option, callOptions...)
return collectionNames, err
}

// DescribeCollection Describe collection
func (mc *MilvusClient) DescribeCollection(ctx context.Context, option clientv2.DescribeCollectionOption, callOptions ...grpc.CallOption) (*entity.Collection, error) {
func (mc *MilvusClient) DescribeCollection(ctx context.Context, option client.DescribeCollectionOption, callOptions ...grpc.CallOption) (*entity.Collection, error) {
collection, err := mc.mClient.DescribeCollection(ctx, option, callOptions...)
return collection, err
}

// HasCollection Has collection
func (mc *MilvusClient) HasCollection(ctx context.Context, option clientv2.HasCollectionOption, callOptions ...grpc.CallOption) (bool, error) {
func (mc *MilvusClient) HasCollection(ctx context.Context, option client.HasCollectionOption, callOptions ...grpc.CallOption) (bool, error) {
has, err := mc.mClient.HasCollection(ctx, option, callOptions...)
return has, err
}

// DropCollection Drop Collection
func (mc *MilvusClient) DropCollection(ctx context.Context, option clientv2.DropCollectionOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) DropCollection(ctx context.Context, option client.DropCollectionOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.DropCollection(ctx, option, callOptions...)
return err
}

// -- partition --

// CreatePartition Create Partition
func (mc *MilvusClient) CreatePartition(ctx context.Context, option clientv2.CreatePartitionOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) CreatePartition(ctx context.Context, option client.CreatePartitionOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.CreatePartition(ctx, option, callOptions...)
return err
}

// DropPartition Drop Partition
func (mc *MilvusClient) DropPartition(ctx context.Context, option clientv2.DropPartitionOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) DropPartition(ctx context.Context, option client.DropPartitionOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.DropPartition(ctx, option, callOptions...)
return err
}

// HasPartition Has Partition
func (mc *MilvusClient) HasPartition(ctx context.Context, option clientv2.HasPartitionOption, callOptions ...grpc.CallOption) (bool, error) {
func (mc *MilvusClient) HasPartition(ctx context.Context, option client.HasPartitionOption, callOptions ...grpc.CallOption) (bool, error) {
has, err := mc.mClient.HasPartition(ctx, option, callOptions...)
return has, err
}

// ListPartitions List Partitions
func (mc *MilvusClient) ListPartitions(ctx context.Context, option clientv2.ListPartitionsOption, callOptions ...grpc.CallOption) ([]string, error) {
func (mc *MilvusClient) ListPartitions(ctx context.Context, option client.ListPartitionsOption, callOptions ...grpc.CallOption) ([]string, error) {
partitionNames, err := mc.mClient.ListPartitions(ctx, option, callOptions...)
return partitionNames, err
}

// LoadPartitions Load Partitions into memory
func (mc *MilvusClient) LoadPartitions(ctx context.Context, option clientv2.LoadPartitionsOption, callOptions ...grpc.CallOption) (clientv2.LoadTask, error) {
func (mc *MilvusClient) LoadPartitions(ctx context.Context, option client.LoadPartitionsOption, callOptions ...grpc.CallOption) (client.LoadTask, error) {
loadTask, err := mc.mClient.LoadPartitions(ctx, option, callOptions...)
return loadTask, err
}

// -- index --

// CreateIndex Create Index
func (mc *MilvusClient) CreateIndex(ctx context.Context, option clientv2.CreateIndexOption, callOptions ...grpc.CallOption) (*clientv2.CreateIndexTask, error) {
func (mc *MilvusClient) CreateIndex(ctx context.Context, option client.CreateIndexOption, callOptions ...grpc.CallOption) (*client.CreateIndexTask, error) {
createIndexTask, err := mc.mClient.CreateIndex(ctx, option, callOptions...)
return createIndexTask, err
}

// ListIndexes List Indexes
func (mc *MilvusClient) ListIndexes(ctx context.Context, option clientv2.ListIndexOption, callOptions ...grpc.CallOption) ([]string, error) {
func (mc *MilvusClient) ListIndexes(ctx context.Context, option client.ListIndexOption, callOptions ...grpc.CallOption) ([]string, error) {
indexes, err := mc.mClient.ListIndexes(ctx, option, callOptions...)
return indexes, err
}

// DescribeIndex Describe Index
func (mc *MilvusClient) DescribeIndex(ctx context.Context, option clientv2.DescribeIndexOption, callOptions ...grpc.CallOption) (index.Index, error) {
idx, err := mc.mClient.DescribeIndex(ctx, option, callOptions...)
return idx, err
func (mc *MilvusClient) DescribeIndex(ctx context.Context, option client.DescribeIndexOption, callOptions ...grpc.CallOption) (client.IndexDescription, error) {
idxDesc, err := mc.mClient.DescribeIndex(ctx, option, callOptions...)
return idxDesc, err
}

// DropIndex Drop Index
func (mc *MilvusClient) DropIndex(ctx context.Context, option clientv2.DropIndexOption, callOptions ...grpc.CallOption) error {
func (mc *MilvusClient) DropIndex(ctx context.Context, option client.DropIndexOption, callOptions ...grpc.CallOption) error {
err := mc.mClient.DropIndex(ctx, option, callOptions...)
return err
}

// -- write --

// Insert insert data
func (mc *MilvusClient) Insert(ctx context.Context, option clientv2.InsertOption, callOptions ...grpc.CallOption) (clientv2.InsertResult, error) {
func (mc *MilvusClient) Insert(ctx context.Context, option client.InsertOption, callOptions ...grpc.CallOption) (client.InsertResult, error) {
insertRes, err := mc.mClient.Insert(ctx, option, callOptions...)
if err == nil {
log.Info("Insert", zap.Any("result", insertRes))
Expand All @@ -202,39 +201,39 @@ func (mc *MilvusClient) Insert(ctx context.Context, option clientv2.InsertOption
}

// Flush flush data
func (mc *MilvusClient) Flush(ctx context.Context, option clientv2.FlushOption, callOptions ...grpc.CallOption) (*clientv2.FlushTask, error) {
func (mc *MilvusClient) Flush(ctx context.Context, option client.FlushOption, callOptions ...grpc.CallOption) (*client.FlushTask, error) {
flushTask, err := mc.mClient.Flush(ctx, option, callOptions...)
return flushTask, err
}

// Delete deletes data
func (mc *MilvusClient) Delete(ctx context.Context, option clientv2.DeleteOption, callOptions ...grpc.CallOption) (clientv2.DeleteResult, error) {
func (mc *MilvusClient) Delete(ctx context.Context, option client.DeleteOption, callOptions ...grpc.CallOption) (client.DeleteResult, error) {
deleteRes, err := mc.mClient.Delete(ctx, option, callOptions...)
return deleteRes, err
}

// Upsert upsert data
func (mc *MilvusClient) Upsert(ctx context.Context, option clientv2.UpsertOption, callOptions ...grpc.CallOption) (clientv2.UpsertResult, error) {
func (mc *MilvusClient) Upsert(ctx context.Context, option client.UpsertOption, callOptions ...grpc.CallOption) (client.UpsertResult, error) {
upsertRes, err := mc.mClient.Upsert(ctx, option, callOptions...)
return upsertRes, err
}

// -- read --

// LoadCollection Load Collection
func (mc *MilvusClient) LoadCollection(ctx context.Context, option clientv2.LoadCollectionOption, callOptions ...grpc.CallOption) (clientv2.LoadTask, error) {
func (mc *MilvusClient) LoadCollection(ctx context.Context, option client.LoadCollectionOption, callOptions ...grpc.CallOption) (client.LoadTask, error) {
loadTask, err := mc.mClient.LoadCollection(ctx, option, callOptions...)
return loadTask, err
}

// Search search from collection
func (mc *MilvusClient) Search(ctx context.Context, option clientv2.SearchOption, callOptions ...grpc.CallOption) ([]clientv2.ResultSet, error) {
func (mc *MilvusClient) Search(ctx context.Context, option client.SearchOption, callOptions ...grpc.CallOption) ([]client.ResultSet, error) {
resultSets, err := mc.mClient.Search(ctx, option, callOptions...)
return resultSets, err
}

// Query query from collection
func (mc *MilvusClient) Query(ctx context.Context, option clientv2.QueryOption, callOptions ...grpc.CallOption) (clientv2.ResultSet, error) {
func (mc *MilvusClient) Query(ctx context.Context, option client.QueryOption, callOptions ...grpc.CallOption) (client.ResultSet, error) {
resultSet, err := mc.mClient.Query(ctx, option, callOptions...)
return resultSet, err
}
11 changes: 11 additions & 0 deletions tests/go_client/common/consts.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package common

import "github.com/milvus-io/milvus/client/v2/index"

// cost default field name
const (
DefaultInt8FieldName = "int8"
Expand Down Expand Up @@ -65,3 +67,12 @@ const (
MaxVectorFieldNum = 4
MaxShardNum = 16
)

const (
IndexStateIndexStateNone index.IndexState = 0
IndexStateUnissued index.IndexState = 1
IndexStateInProgress index.IndexState = 2
IndexStateFinished index.IndexState = 3
IndexStateFailed index.IndexState = 4
IndexStateRetry index.IndexState = 5
)
48 changes: 45 additions & 3 deletions tests/go_client/common/response_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

clientv2 "github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/column"
"github.com/milvus-io/milvus/client/v2/entity"
"github.com/milvus-io/milvus/client/v2/index"
"github.com/milvus-io/milvus/pkg/log"
)

Expand Down Expand Up @@ -123,7 +124,7 @@ func EqualArrayColumn(t *testing.T, columnA column.Column, columnB column.Column
}

// CheckInsertResult check insert result, ids len (insert count), ids data (pks, but no auto ids)
func CheckInsertResult(t *testing.T, expIds column.Column, insertRes clientv2.InsertResult) {
func CheckInsertResult(t *testing.T, expIds column.Column, insertRes client.InsertResult) {
require.Equal(t, expIds.Len(), insertRes.IDs.Len())
require.Equal(t, expIds.Len(), int(insertRes.InsertCount))
actualIds := insertRes.IDs
Expand All @@ -149,7 +150,7 @@ func CheckOutputFields(t *testing.T, expFields []string, actualColumns []column.
}

// CheckSearchResult check search result, check nq, topk, ids, score
func CheckSearchResult(t *testing.T, actualSearchResults []clientv2.ResultSet, expNq int, expTopK int) {
func CheckSearchResult(t *testing.T, actualSearchResults []client.ResultSet, expNq int, expTopK int) {
require.Equal(t, len(actualSearchResults), expNq)
require.Len(t, actualSearchResults, expNq)
for _, actualSearchResult := range actualSearchResults {
Expand All @@ -176,3 +177,44 @@ func CheckQueryResult(t *testing.T, expColumns []column.Column, actualColumns []
}
}
}

// GenColumnDataOption -- create column data --
type checkIndexOpt struct {
state index.IndexState
pendingIndexRows int64
totalRows int64
indexedRows int64
}

func TNewCheckIndexOpt(totalRows int64) *checkIndexOpt {
return &checkIndexOpt{
state: IndexStateFinished,
totalRows: totalRows,
pendingIndexRows: 0,
indexedRows: totalRows,
}
}

func (opt *checkIndexOpt) TWithIndexState(state index.IndexState) *checkIndexOpt {
opt.state = state
return opt
}

func (opt *checkIndexOpt) TWithIndexRows(totalRows int64, indexedRows int64, pendingIndexRows int64) *checkIndexOpt {
opt.totalRows = totalRows
opt.indexedRows = indexedRows
opt.pendingIndexRows = pendingIndexRows
return opt
}

func CheckIndex(t *testing.T, actualIdxDesc client.IndexDescription, idx index.Index, opt *checkIndexOpt) {
require.EqualValuesf(t, idx, actualIdxDesc.Index, "Actual index is not same with expected index")
require.Equal(t, actualIdxDesc.TotalRows, actualIdxDesc.PendingIndexRows+actualIdxDesc.IndexedRows)
if opt != nil {
require.Equal(t, opt.totalRows, opt.pendingIndexRows+opt.indexedRows)
require.Equal(t, opt.state, actualIdxDesc.State)
require.Equal(t, opt.totalRows, actualIdxDesc.TotalRows)
require.Equal(t, opt.indexedRows, actualIdxDesc.IndexedRows)
require.Equal(t, opt.pendingIndexRows, actualIdxDesc.PendingIndexRows)
}
}
6 changes: 4 additions & 2 deletions tests/go_client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.21.11

require (
github.com/milvus-io/milvus/client/v2 v2.0.0-20240729131949-a8a4779749de
github.com/milvus-io/milvus/client/v2 v2.0.0-20240805024817-4b553b0333f4
github.com/milvus-io/milvus/pkg v0.0.2-0.20240801085213-a642a26ed4c6
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/stretchr/testify v1.9.0
Expand All @@ -14,6 +14,8 @@ require (
google.golang.org/grpc v1.65.0
)

replace github.com/milvus-io/milvus/client/v2 v2.0.0-20240805024817-4b553b0333f4 => ../../../milvus/client

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
Expand Down Expand Up @@ -114,7 +116,7 @@ require (
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/protobuf v1.34.2 // indirect
Expand Down
8 changes: 4 additions & 4 deletions tests/go_client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240717062137-3ffb1db01632 h1:CXig0DNtUsCLzchCFe3PR2KgOdobbz9gK2nSV7195PM=
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20240717062137-3ffb1db01632/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
github.com/milvus-io/milvus/client/v2 v2.0.0-20240729131949-a8a4779749de h1:GtxjVQ5VfGNf/bEN/K4zKCnVXtq7PkSsniWVlAF7GlI=
github.com/milvus-io/milvus/client/v2 v2.0.0-20240729131949-a8a4779749de/go.mod h1:CGX8NwpP5T7tSDzYOBJDgyW1PK/vNixosoR8r5BMqMA=
github.com/milvus-io/milvus/client/v2 v2.0.0-20240805024817-4b553b0333f4 h1:0VEsc69duq3NMNRYWq0qtJDN6HSj13USju1ZdlmvUo0=
github.com/milvus-io/milvus/client/v2 v2.0.0-20240805024817-4b553b0333f4/go.mod h1:p2fU+bPgEy+OBYUvhE1+ABEp3KaFQyY586DSs6iEDHk=
github.com/milvus-io/milvus/pkg v0.0.2-0.20240801085213-a642a26ed4c6 h1:dotu470D/DkctdLHsTCCmuvAD3h5C8gkFhMxb0Zlu7A=
github.com/milvus-io/milvus/pkg v0.0.2-0.20240801085213-a642a26ed4c6/go.mod h1:tdeEcpeaAcrIJgrr6LVzu7SYl9zn18dNKZwPmCUb0Io=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
Expand Down Expand Up @@ -1014,8 +1014,8 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY=
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ=
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY=
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw=
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q=
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ func TestCreateCollectionInvalid(t *testing.T) {
}
vecField := entity.NewField().WithName("vec").WithDataType(entity.FieldTypeFloatVector).WithDim(8)
mSchemaErrs := []mSchemaErr{
{schema: nil, errMsg: "duplicated field name"},
{schema: nil, errMsg: "schema does not contain vector field"},
{schema: entity.NewSchema().WithField(vecField), errMsg: "collection name should not be empty"}, // no collection name
{schema: entity.NewSchema().WithName("aaa").WithField(vecField), errMsg: "primary key is not specified"}, // no pk field
{schema: entity.NewSchema().WithName("aaa").WithField(vecField).WithField(entity.NewField()), errMsg: "primary key is not specified"},
Expand Down
Loading

0 comments on commit a62118c

Please sign in to comment.