mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-11 09:46:26 +08:00
eff75c7701
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>
40 lines
880 B
Go
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()
|
|
}
|