Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
e4e762f2
M
milvus
项目概览
milvus
/
milvus
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
e4e762f2
编写于
9月 26, 2021
作者:
G
groot
提交者:
GitHub
9月 26, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce go unittest time cost (#8503)
Signed-off-by:
N
yhmo
<
yihua.mo@zilliz.com
>
上级
a6a64692
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
15 deletion
+15
-15
internal/datanode/data_node_test.go
internal/datanode/data_node_test.go
+1
-1
internal/indexcoord/index_coord_test.go
internal/indexcoord/index_coord_test.go
+2
-2
internal/indexnode/indexnode_test.go
internal/indexnode/indexnode_test.go
+4
-4
internal/kv/etcd/etcd_kv_test.go
internal/kv/etcd/etcd_kv_test.go
+1
-1
internal/proxy/channels_time_ticker_test.go
internal/proxy/channels_time_ticker_test.go
+7
-7
未找到文件。
internal/datanode/data_node_test.go
浏览文件 @
e4e762f2
...
...
@@ -386,7 +386,7 @@ func TestDataNode(t *testing.T) {
require
.
NoError
(
t
,
err
)
require
.
Equal
(
t
,
1
,
len
(
node
.
vchan2FlushCh
))
require
.
Equal
(
t
,
1
,
len
(
node
.
vchan2SyncService
))
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
node
.
ReleaseDataSyncService
(
dmChannelName
)
assert
.
Equal
(
t
,
0
,
len
(
node
.
vchan2FlushCh
))
...
...
internal/indexcoord/index_coord_test.go
浏览文件 @
e4e762f2
...
...
@@ -112,7 +112,7 @@ func TestIndexCoord(t *testing.T) {
resp
.
States
[
0
]
.
State
==
commonpb
.
IndexState_Failed
{
break
}
time
.
Sleep
(
1
*
time
.
S
econd
)
time
.
Sleep
(
1
00
*
time
.
Millis
econd
)
}
})
...
...
@@ -182,7 +182,7 @@ func TestIndexCoord(t *testing.T) {
indexMeta
:=
ic
.
metaTable
.
GetIndexMetaByIndexBuildID
(
indexBuildID
)
for
indexMeta
!=
nil
{
indexMeta
=
ic
.
metaTable
.
GetIndexMetaByIndexBuildID
(
indexBuildID
)
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
}
})
...
...
internal/indexnode/indexnode_test.go
浏览文件 @
e4e762f2
...
...
@@ -170,7 +170,7 @@ func TestIndexNode(t *testing.T) {
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
assert
.
Nil
(
t
,
err
)
for
indexMetaTmp
.
State
!=
commonpb
.
IndexState_Finished
{
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
value
,
err
=
in
.
etcdKV
.
Load
(
metaPath1
)
assert
.
Nil
(
t
,
err
)
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
...
...
@@ -280,7 +280,7 @@ func TestIndexNode(t *testing.T) {
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
assert
.
Nil
(
t
,
err
)
for
indexMetaTmp
.
State
!=
commonpb
.
IndexState_Finished
{
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
value
,
err
=
in
.
etcdKV
.
Load
(
metaPath2
)
assert
.
Nil
(
t
,
err
)
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
...
...
@@ -574,7 +574,7 @@ func TestCreateIndexFailed(t *testing.T) {
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
assert
.
Nil
(
t
,
err
)
for
indexMetaTmp
.
State
!=
commonpb
.
IndexState_Failed
{
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
value
,
err
=
in
.
etcdKV
.
Load
(
metaPath1
)
assert
.
Nil
(
t
,
err
)
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
...
...
@@ -692,7 +692,7 @@ func TestCreateIndexFailed(t *testing.T) {
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
assert
.
Nil
(
t
,
err
)
for
indexMetaTmp
.
State
!=
commonpb
.
IndexState_Failed
{
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
value
,
err
=
in
.
etcdKV
.
Load
(
metaPath2
)
assert
.
Nil
(
t
,
err
)
err
=
proto
.
UnmarshalText
(
value
,
&
indexMetaTmp
)
...
...
internal/kv/etcd/etcd_kv_test.go
浏览文件 @
e4e762f2
...
...
@@ -495,7 +495,7 @@ func TestElapse(t *testing.T) {
isElapse
:=
etcdkv
.
CheckElapseAndWarn
(
start
,
"err message"
)
assert
.
Equal
(
t
,
isElapse
,
false
)
time
.
Sleep
(
time
.
Duration
(
3
)
*
time
.
S
econd
)
time
.
Sleep
(
2001
*
time
.
Millis
econd
)
isElapse
=
etcdkv
.
CheckElapseAndWarn
(
start
,
"err message"
)
assert
.
Equal
(
t
,
isElapse
,
true
)
}
internal/proxy/channels_time_ticker_test.go
浏览文件 @
e4e762f2
...
...
@@ -68,7 +68,7 @@ func TestChannelsTimeTickerImpl_start(t *testing.T) {
assert
.
Equal
(
t
,
nil
,
err
)
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
}
func
TestChannelsTimeTickerImpl_close
(
t
*
testing
.
T
)
{
...
...
@@ -90,7 +90,7 @@ func TestChannelsTimeTickerImpl_close(t *testing.T) {
assert
.
Equal
(
t
,
nil
,
err
)
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
}
func
TestChannelsTimeTickerImpl_addPChan
(
t
*
testing
.
T
)
{
...
...
@@ -118,7 +118,7 @@ func TestChannelsTimeTickerImpl_addPChan(t *testing.T) {
assert
.
Equal
(
t
,
nil
,
err
)
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
}
func
TestChannelsTimeTickerImpl_getLastTick
(
t
*
testing
.
T
)
{
...
...
@@ -156,7 +156,7 @@ func TestChannelsTimeTickerImpl_getLastTick(t *testing.T) {
}
}
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
b
<-
struct
{}{}
wg
.
Wait
()
...
...
@@ -165,7 +165,7 @@ func TestChannelsTimeTickerImpl_getLastTick(t *testing.T) {
assert
.
Equal
(
t
,
nil
,
err
)
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
}
func
TestChannelsTimeTickerImpl_getMinTsStatistics
(
t
*
testing
.
T
)
{
...
...
@@ -203,7 +203,7 @@ func TestChannelsTimeTickerImpl_getMinTsStatistics(t *testing.T) {
}
}
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
b
<-
struct
{}{}
wg
.
Wait
()
...
...
@@ -212,5 +212,5 @@ func TestChannelsTimeTickerImpl_getMinTsStatistics(t *testing.T) {
assert
.
Equal
(
t
,
nil
,
err
)
}()
time
.
Sleep
(
time
.
S
econd
)
time
.
Sleep
(
100
*
time
.
Millis
econd
)
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录