reader_test.go 586 字节
Newer Older
1 2 3 4
package reader

import (
	"context"
5
	"github.com/zilliztech/milvus-distributed/internal/conf"
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
	"strconv"
	"testing"
	"time"
)

const ctxTimeInMillisecond = 10

// NOTE: start pulsar before test
func TestReader_startQueryNode(t *testing.T) {
	conf.LoadConfig("config.yaml")

	d := time.Now().Add(ctxTimeInMillisecond * time.Millisecond)
	ctx, _ := context.WithDeadline(context.Background(), d)

	pulsarAddr := "pulsar://"
	pulsarAddr += conf.Config.Pulsar.Address
	pulsarAddr += ":"
	pulsarAddr += strconv.FormatInt(int64(conf.Config.Pulsar.Port), 10)
	StartQueryNode(ctx, pulsarAddr)
}