mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
54 lines
1.6 KiB
Go
54 lines
1.6 KiB
Go
package reader
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestSegmentManagement_SegmentsManagement(t *testing.T) {
|
|
// Construct node, collection, partition and segment
|
|
node := NewQueryNode(0, 0)
|
|
var collection = node.NewCollection("collection0", "fake schema")
|
|
var partition = collection.NewPartition("partition0")
|
|
var segment = partition.NewSegment(0)
|
|
node.SegmentsMap[0] = segment
|
|
|
|
// TODO: fix segment management
|
|
node.SegmentsManagement()
|
|
}
|
|
|
|
func TestSegmentManagement_SegmentService(t *testing.T) {
|
|
// Construct node, collection, partition and segment
|
|
node := NewQueryNode(0, 0)
|
|
var collection = node.NewCollection("collection0", "fake schema")
|
|
var partition = collection.NewPartition("partition0")
|
|
var segment = partition.NewSegment(0)
|
|
node.SegmentsMap[0] = segment
|
|
|
|
// TODO: fix segment service
|
|
node.SegmentManagementService()
|
|
}
|
|
|
|
func TestSegmentManagement_SegmentStatistic(t *testing.T) {
|
|
// Construct node, collection, partition and segment
|
|
node := NewQueryNode(0, 0)
|
|
var collection = node.NewCollection("collection0", "fake schema")
|
|
var partition = collection.NewPartition("partition0")
|
|
var segment = partition.NewSegment(0)
|
|
node.SegmentsMap[0] = segment
|
|
|
|
// TODO: start pulsar server
|
|
node.SegmentStatistic(1000)
|
|
}
|
|
|
|
func TestSegmentManagement_SegmentStatisticService(t *testing.T) {
|
|
// Construct node, collection, partition and segment
|
|
node := NewQueryNode(0, 0)
|
|
var collection = node.NewCollection("collection0", "fake schema")
|
|
var partition = collection.NewPartition("partition0")
|
|
var segment = partition.NewSegment(0)
|
|
node.SegmentsMap[0] = segment
|
|
|
|
// TODO: start pulsar server
|
|
node.SegmentStatisticService()
|
|
}
|