mirror of https://github.com/milvus-io/milvus.git
Fix unit test in dataservice (#5745)
After a unit test, the msg stream will be closed. But in pulsar go client, the connection between client and server will be reconnected. Then we rebuild the msgstream immediately and produce a message, this message will be sent to the previous connection which cause timeout of test. We append the channelName wil a random value. Signed-off-by: sunby <bingyi.sun@zilliz.com>pull/5779/head
parent
89c0acd8b8
commit
ba9952e780
|
@ -13,9 +13,12 @@ import (
|
|||
"context"
|
||||
"math"
|
||||
"path"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"math/rand"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/msgstream"
|
||||
"github.com/milvus-io/milvus/internal/proto/commonpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -831,6 +834,8 @@ func TestGetRecoveryInfo(t *testing.T) {
|
|||
|
||||
func newTestServer(t *testing.T, receiveCh chan interface{}) *Server {
|
||||
Params.Init()
|
||||
Params.TimeTickChannelName += strconv.Itoa(rand.Int())
|
||||
Params.StatisticsChannelName += strconv.Itoa(rand.Int())
|
||||
var err error
|
||||
factory := msgstream.NewPmsFactory()
|
||||
m := map[string]interface{}{
|
||||
|
|
Loading…
Reference in New Issue