fix: unstable test case TestTask_VarCharPrimaryKey (#46106)

issue: #46105

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
wei liu 2025-12-05 14:01:12 +08:00 committed by GitHub
parent 3daff1ab2b
commit 354fe9c9d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2593,7 +2593,11 @@ func TestTask_VarCharPrimaryKey(t *testing.T) {
})
t.Run("upsert", func(t *testing.T) {
hash := testutils.GenerateHashKeys(nb)
// upsert require pk unique in same batch
hash := make([]uint32, nb)
for i := 0; i < nb; i++ {
hash[i] = uint32(i)
}
task := &upsertTask{
upsertMsg: &msgstream.UpsertMsg{
InsertMsg: &BaseInsertTask{