milvus/tests-deprecating/go/key2seg_test.go
binbin eff75c7701
Replace sdk source and merge tests and tests20 (#7182)
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>
2021-08-20 11:00:56 +08:00

40 lines
880 B
Go

package test
import (
"testing"
"github.com/milvus-io/milvus/internal/util/typeutil"
)
type UniqueID = typeutil.UniqueID
func TestKey2Seg(t *testing.T) {
// TODO: fix test
//return
//
//lookupUrl := "pulsar://localhost:6650"
//client, err := pulsar.NewClient(pulsar.ClientOptions{
// URL: lookupUrl,
//})
//if err != nil {
// log.Fatal(err)
//}
//
//consumer, err := client.Subscribe(pulsar.ConsumerOptions{
// Topic: "Key2Seg",
// SubscriptionName: "sub-1",
//})
//
//obj := msgpb.Key2SegMsg{}
//msg, err := consumer.Receive(context.Background())
//proto.Unmarshal(msg.Payload(), &obj)
//assert.Equal(t, obj.Uid, UniqueID(0))
//consumer.Ack(msg)
//msg, err = consumer.Receive(context.Background())
//proto.Unmarshal(msg.Payload(), &obj)
//assert.Equal(t, obj.Uid, UniqueID(0))
//consumer.Ack(msg)
//consumer.Close()
//client.Close()
}