mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
issue: #33285 - move most cgo opeartions related to search/query into segcore package for reusing for streamingnode. - add go unittest for segcore operations. Signed-off-by: chyezh <chyezh@outlook.com>
35 lines
613 B
Go
35 lines
613 B
Go
package segcore
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/datapb"
|
|
)
|
|
|
|
func TestLoadFieldDataRequest(t *testing.T) {
|
|
req := &LoadFieldDataRequest{
|
|
Fields: []LoadFieldDataInfo{{
|
|
Field: &datapb.FieldBinlog{
|
|
FieldID: 1,
|
|
Binlogs: []*datapb.Binlog{
|
|
{
|
|
EntriesNum: 100,
|
|
LogPath: "1",
|
|
}, {
|
|
EntriesNum: 101,
|
|
LogPath: "2",
|
|
},
|
|
},
|
|
},
|
|
}},
|
|
RowCount: 100,
|
|
MMapDir: "1234567890",
|
|
}
|
|
creq, err := req.getCLoadFieldDataRequest()
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, creq)
|
|
creq.Release()
|
|
}
|