Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
909dd737
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
909dd737
编写于
4月 06, 2022
作者:
X
XuanYang-cn
提交者:
GitHub
4月 06, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Avoid using specific port in ut (#16398)
Signed-off-by:
N
yangxuan
<
xuan.yang@zilliz.com
>
上级
4cb7c28b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
14 deletion
+14
-14
internal/distributed/connection_manager_test.go
internal/distributed/connection_manager_test.go
+14
-14
未找到文件。
internal/distributed/connection_manager_test.go
浏览文件 @
909dd737
...
...
@@ -55,7 +55,7 @@ func TestConnectionManager(t *testing.T) {
cm
.
Start
()
t
.
Run
(
"rootCoord"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
rootCoord
:=
&
testRootCoord
{}
...
...
@@ -63,7 +63,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
rootcoordpb
.
RegisterRootCoordServer
(
grpcServer
,
rootCoord
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
RootCoordRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
RootCoordRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
rootCoord
,
ok
:=
cm
.
GetRootCoordClient
()
...
...
@@ -72,7 +72,7 @@ func TestConnectionManager(t *testing.T) {
})
t
.
Run
(
"queryCoord"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
queryCoord
:=
&
testQueryCoord
{}
...
...
@@ -80,7 +80,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
querypb
.
RegisterQueryCoordServer
(
grpcServer
,
queryCoord
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
QueryCoordRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
QueryCoordRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
queryCoord
,
ok
:=
cm
.
GetQueryCoordClient
()
...
...
@@ -89,7 +89,7 @@ func TestConnectionManager(t *testing.T) {
})
t
.
Run
(
"dataCoord"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
dataCoord
:=
&
testDataCoord
{}
...
...
@@ -97,7 +97,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
datapb
.
RegisterDataCoordServer
(
grpcServer
,
dataCoord
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
DataCoordRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
DataCoordRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
dataCoord
,
ok
:=
cm
.
GetDataCoordClient
()
...
...
@@ -106,7 +106,7 @@ func TestConnectionManager(t *testing.T) {
})
t
.
Run
(
"indexCoord"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
indexCoord
:=
&
testIndexCoord
{}
...
...
@@ -114,7 +114,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
indexpb
.
RegisterIndexCoordServer
(
grpcServer
,
indexCoord
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
IndexCoordRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
IndexCoordRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
indexCoord
,
ok
:=
cm
.
GetIndexCoordClient
()
...
...
@@ -123,7 +123,7 @@ func TestConnectionManager(t *testing.T) {
})
t
.
Run
(
"queryNode"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
queryNode
:=
&
testQueryNode
{}
...
...
@@ -131,7 +131,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
querypb
.
RegisterQueryNodeServer
(
grpcServer
,
queryNode
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
QueryNodeRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
QueryNodeRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
queryNodes
,
ok
:=
cm
.
GetQueryNodeClients
()
...
...
@@ -140,7 +140,7 @@ func TestConnectionManager(t *testing.T) {
})
t
.
Run
(
"dataNode"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
dataNode
:=
&
testDataNode
{}
...
...
@@ -148,7 +148,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
datapb
.
RegisterDataNodeServer
(
grpcServer
,
dataNode
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
DataNodeRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
DataNodeRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
dataNodes
,
ok
:=
cm
.
GetDataNodeClients
()
...
...
@@ -157,7 +157,7 @@ func TestConnectionManager(t *testing.T) {
})
t
.
Run
(
"indexNode"
,
func
(
t
*
testing
.
T
)
{
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
:9999
"
)
lis
,
err
:=
net
.
Listen
(
"tcp"
,
"
127.0.0.1:
"
)
assert
.
Nil
(
t
,
err
)
defer
lis
.
Close
()
indexNode
:=
&
testIndexNode
{}
...
...
@@ -165,7 +165,7 @@ func TestConnectionManager(t *testing.T) {
defer
grpcServer
.
Stop
()
indexpb
.
RegisterIndexNodeServer
(
grpcServer
,
indexNode
)
go
grpcServer
.
Serve
(
lis
)
session
.
Init
(
typeutil
.
IndexNodeRole
,
"127.0.0.1:9999"
,
true
,
false
)
session
.
Init
(
typeutil
.
IndexNodeRole
,
lis
.
Addr
()
.
String
()
,
true
,
false
)
session
.
Register
()
assert
.
Eventually
(
t
,
func
()
bool
{
indexNodes
,
ok
:=
cm
.
GetIndexNodeClients
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录