milvus/reader/read_node/reader_test.go
bigsheeper 721998050b Add context to query node
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2020-10-14 11:07:25 +08:00

26 lines
562 B
Go

package reader
import (
"context"
"github.com/czs007/suvlim/conf"
"strconv"
"testing"
"time"
)
const ctxTimeInMillisecond = 200
// 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)
}