Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Sync autoID insert/upsert test cases #788

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/testcases/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestInsertAutoIdPkData(t *testing.T) {
// insert
pkColumn, floatColumn, vecColumn := common.GenDefaultColumnData(0, common.DefaultNb, common.DefaultDim)
_, errInsert := mc.Insert(ctx, collName, "", pkColumn, floatColumn, vecColumn)
common.CheckErr(t, errInsert, false, "can not assign primary field data when auto id enabled")
common.CheckErr(t, errInsert, false, "invalid parameter")

// flush and check row count
errFlush := mc.Flush(ctx, collName, false)
Expand Down
4 changes: 2 additions & 2 deletions test/testcases/upsert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ func TestUpsertAutoID(t *testing.T) {
// upsert without pks
_, floatColumn1, vecColumn1 := common.GenDefaultColumnData(0, 100, common.DefaultDim)
_, err := mc.Upsert(ctx, collName, "", floatColumn1, vecColumn1)
common.CheckErr(t, err, false, "upsert can not assign primary field data when auto id enabled")
common.CheckErr(t, err, false, "invalid parameter")

// upsert with pks
pkColumn := entity.NewColumnInt64(common.DefaultIntFieldName, ids.(*entity.ColumnInt64).Data()[:100])
_, err = mc.Upsert(ctx, collName, "", pkColumn, floatColumn1, vecColumn1)
common.CheckErr(t, err, false, "upsert can not assign primary field data when auto id enabled")
common.CheckErr(t, err, true)
}

func TestUpsertVarcharPk(t *testing.T) {
Expand Down
Loading