mirror of https://github.com/milvus-io/milvus.git
Add code coverage for go files
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>pull/4973/head^2
parent
5e67e5eb43
commit
a2f2284932
|
@ -31,6 +31,7 @@ type MsgStream interface {
|
||||||
Produce(*MsgPack) error
|
Produce(*MsgPack) error
|
||||||
Broadcast(*MsgPack) error
|
Broadcast(*MsgPack) error
|
||||||
Consume() *MsgPack
|
Consume() *MsgPack
|
||||||
|
Chan() <-chan *MsgPack
|
||||||
}
|
}
|
||||||
|
|
||||||
type PulsarMsgStream struct {
|
type PulsarMsgStream struct {
|
||||||
|
@ -108,7 +109,9 @@ func (ms *PulsarMsgStream) Start() {
|
||||||
|
|
||||||
func (ms *PulsarMsgStream) Close() {
|
func (ms *PulsarMsgStream) Close() {
|
||||||
ms.streamCancel()
|
ms.streamCancel()
|
||||||
ms.wait.Wait()
|
if ms.wait != nil {
|
||||||
|
ms.wait.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
for _, producer := range ms.producers {
|
for _, producer := range ms.producers {
|
||||||
if producer != nil {
|
if producer != nil {
|
||||||
|
@ -252,6 +255,10 @@ func (ms *PulsarMsgStream) bufMsgPackToChannel() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ms *PulsarMsgStream) Chan() <-chan *MsgPack {
|
||||||
|
return ms.receiveBuf
|
||||||
|
}
|
||||||
|
|
||||||
type PulsarTtMsgStream struct {
|
type PulsarTtMsgStream struct {
|
||||||
PulsarMsgStream
|
PulsarMsgStream
|
||||||
inputBuf []*TsMsg
|
inputBuf []*TsMsg
|
||||||
|
|
|
@ -13,4 +13,4 @@ SCRIPTS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
# ignore Minio,S3 unittes
|
# ignore Minio,S3 unittes
|
||||||
MILVUS_DIR="${SCRIPTS_DIR}/../internal/"
|
MILVUS_DIR="${SCRIPTS_DIR}/../internal/"
|
||||||
echo $MILVUS_DIR
|
echo $MILVUS_DIR
|
||||||
go test "${MILVUS_DIR}/kv/..." "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/master/..." "${MILVUS_DIR}/reader/..." -failfast
|
go test -cover "${MILVUS_DIR}/kv/..." "${MILVUS_DIR}/msgstream/..." "${MILVUS_DIR}/master/..." "${MILVUS_DIR}/reader/..." -failfast
|
||||||
|
|
Loading…
Reference in New Issue