Skip to content

Commit

Permalink
Fix e2e auto id test
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia committed Feb 20, 2024
1 parent 96eb379 commit c1e0ccf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/testcases/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,20 +220,19 @@ func TestCreateCollectionNonInt64AutoField(t *testing.T) {
entity.FieldTypeInt32,
entity.FieldTypeFloat,
entity.FieldTypeDouble,
entity.FieldTypeVarChar,
// entity.FieldTypeVarChar,
entity.FieldTypeString,
entity.FieldTypeNone,
entity.FieldTypeJSON,
}
for _, fieldType := range invalidPkFields {
fields := []*entity.Field{
common.GenField("non-auto-id", fieldType, common.WithAutoID(true)),
common.GenField(common.DefaultIntFieldName, entity.FieldTypeInt64, common.WithIsPrimaryKey(true), common.WithAutoID(true)),
common.GenField(common.DefaultIntFieldName, fieldType, common.WithIsPrimaryKey(true), common.WithAutoID(true)),
common.GenField(common.DefaultFloatVecFieldName, entity.FieldTypeFloatVector, common.WithDim(common.DefaultDim)),
}
schema := common.GenSchema(common.GenRandomString(6), true, fields)
errNonInt64Field := mc.CreateCollection(ctx, schema, common.DefaultShards)
common.CheckErr(t, errNonInt64Field, false, "only int64 column can be auto generated id")
common.CheckErr(t, errNonInt64Field, false, "only int64 and varchar column can be primary key for now")
}
}

Expand Down

0 comments on commit c1e0ccf

Please sign in to comment.