milvus/reader/segment_test.go
bigsheeper 39addf0a55 Update cgo interfaces and add query node id
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2020-09-02 10:38:08 +08:00

30 lines
731 B
Go

package reader
import (
"testing"
)
func TestConstructorAndDestructor(t *testing.T) {
node := NewQueryNode(0, 0)
var collection = node.NewCollection("collection0", "fake schema")
var partition = collection.NewPartition("partition0")
var segment = partition.NewSegment(0)
partition.DeleteSegment(segment)
collection.DeletePartition(partition)
node.DeleteCollection(collection)
}
func TestSegmentInsert(t *testing.T) {
node := NewQueryNode(0, 0)
var collection = node.NewCollection("collection0", "fake schema")
var partition = collection.NewPartition("partition0")
var segment = partition.NewSegment(0)
partition.DeleteSegment(segment)
collection.DeletePartition(partition)
node.DeleteCollection(collection)
}