498b235461
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Failing after 0s
Publish Builder / amazonlinux2023 (push) Failing after 1s
Build and test / UT for Go (push) Has been skipped
Publish KRTE Images / KRTE (push) Failing after 1s
Build and test / Integration Test (push) Has been skipped
Build and test / Upload Code Coverage (push) Has been skipped
Publish Builder / rockylinux9 (push) Failing after 1s
Publish Builder / ubuntu22.04 (push) Failing after 0s
Publish Builder / ubuntu24.04 (push) Failing after 0s
Publish Gpu Builder / publish-gpu-builder (push) Failing after 1s
Publish Test Images / PyTest (push) Failing after 0s
Build and test / UT for Cpp (push) Has been cancelled
27 lines
550 B
Go
27 lines
550 B
Go
package deletebuffer
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/milvus-io/milvus/internal/storage"
|
|
)
|
|
|
|
func TestDeleteBufferItem(t *testing.T) {
|
|
item := &BufferItem{
|
|
PartitionID: 100,
|
|
DeleteData: storage.DeleteData{},
|
|
}
|
|
|
|
assert.Equal(t, int64(96), item.Size())
|
|
assert.EqualValues(t, 0, item.EntryNum())
|
|
|
|
item.DeleteData.Pks = []storage.PrimaryKey{
|
|
storage.NewInt64PrimaryKey(10),
|
|
}
|
|
item.DeleteData.Tss = []uint64{2000}
|
|
assert.Equal(t, int64(120), item.Size())
|
|
assert.EqualValues(t, 1, item.EntryNum())
|
|
}
|