mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
Fix ut error (#5573)
Signed-off-by: godchen <qingxiang.chen@zilliz.com>
This commit is contained in:
parent
e76830ab09
commit
0610ceb3dc
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
package miniokv
|
package miniokv
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -62,3 +64,4 @@ func TestMinioStats(t *testing.T) {
|
|||||||
size := w.GetObjectCreateSize()
|
size := w.GetObjectCreateSize()
|
||||||
assert.EqualValues(t, 5, size)
|
assert.EqualValues(t, 5, size)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@ -262,9 +262,6 @@ func TestMasterService(t *testing.T) {
|
|||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
randVal := rand.Int()
|
randVal := rand.Int()
|
||||||
|
|
||||||
err = core.Register()
|
|
||||||
assert.Nil(t, err)
|
|
||||||
|
|
||||||
Params.TimeTickChannel = fmt.Sprintf("master-time-tick-%d", randVal)
|
Params.TimeTickChannel = fmt.Sprintf("master-time-tick-%d", randVal)
|
||||||
Params.DdChannel = fmt.Sprintf("master-dd-%d", randVal)
|
Params.DdChannel = fmt.Sprintf("master-dd-%d", randVal)
|
||||||
Params.StatisticsChannel = fmt.Sprintf("master-statistics-%d", randVal)
|
Params.StatisticsChannel = fmt.Sprintf("master-statistics-%d", randVal)
|
||||||
@ -272,6 +269,9 @@ func TestMasterService(t *testing.T) {
|
|||||||
Params.KvRootPath = fmt.Sprintf("/%d/%s", randVal, Params.KvRootPath)
|
Params.KvRootPath = fmt.Sprintf("/%d/%s", randVal, Params.KvRootPath)
|
||||||
Params.MsgChannelSubName = fmt.Sprintf("subname-%d", randVal)
|
Params.MsgChannelSubName = fmt.Sprintf("subname-%d", randVal)
|
||||||
|
|
||||||
|
err = core.Register()
|
||||||
|
assert.Nil(t, err)
|
||||||
|
|
||||||
etcdCli, err := clientv3.New(clientv3.Config{Endpoints: []string{Params.EtcdAddress}, DialTimeout: 5 * time.Second})
|
etcdCli, err := clientv3.New(clientv3.Config{Endpoints: []string{Params.EtcdAddress}, DialTimeout: 5 * time.Second})
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
sessKey := path.Join(Params.MetaRootPath, sessionutil.DefaultServiceRoot)
|
sessKey := path.Join(Params.MetaRootPath, sessionutil.DefaultServiceRoot)
|
||||||
@ -355,6 +355,7 @@ func TestMasterService(t *testing.T) {
|
|||||||
err = dataServiceSegmentStream.Produce(msgPack)
|
err = dataServiceSegmentStream.Produce(msgPack)
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
flushedSegMsgPack := flushedSegStream.Consume()
|
flushedSegMsgPack := flushedSegStream.Consume()
|
||||||
|
flushedSegStream.Close()
|
||||||
flushedSegPosStr, _ := EncodeMsgPositions(flushedSegMsgPack.EndPositions)
|
flushedSegPosStr, _ := EncodeMsgPositions(flushedSegMsgPack.EndPositions)
|
||||||
_, err = etcdCli.Put(ctx, path.Join(Params.MetaRootPath, FlushedSegMsgEndPosPrefix), flushedSegPosStr)
|
_, err = etcdCli.Put(ctx, path.Join(Params.MetaRootPath, FlushedSegMsgEndPosPrefix), flushedSegPosStr)
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
@ -1746,9 +1747,6 @@ func TestMasterService2(t *testing.T) {
|
|||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
randVal := rand.Int()
|
randVal := rand.Int()
|
||||||
|
|
||||||
err = core.Register()
|
|
||||||
assert.Nil(t, err)
|
|
||||||
|
|
||||||
Params.TimeTickChannel = fmt.Sprintf("master-time-tick-%d", randVal)
|
Params.TimeTickChannel = fmt.Sprintf("master-time-tick-%d", randVal)
|
||||||
Params.DdChannel = fmt.Sprintf("master-dd-%d", randVal)
|
Params.DdChannel = fmt.Sprintf("master-dd-%d", randVal)
|
||||||
Params.StatisticsChannel = fmt.Sprintf("master-statistics-%d", randVal)
|
Params.StatisticsChannel = fmt.Sprintf("master-statistics-%d", randVal)
|
||||||
@ -1756,6 +1754,9 @@ func TestMasterService2(t *testing.T) {
|
|||||||
Params.KvRootPath = fmt.Sprintf("/%d/%s", randVal, Params.KvRootPath)
|
Params.KvRootPath = fmt.Sprintf("/%d/%s", randVal, Params.KvRootPath)
|
||||||
Params.MsgChannelSubName = fmt.Sprintf("subname-%d", randVal)
|
Params.MsgChannelSubName = fmt.Sprintf("subname-%d", randVal)
|
||||||
|
|
||||||
|
err = core.Register()
|
||||||
|
assert.Nil(t, err)
|
||||||
|
|
||||||
pm := &proxyMock{
|
pm := &proxyMock{
|
||||||
randVal: randVal,
|
randVal: randVal,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user