Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
22063c6d
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,发现更多精彩内容 >>
提交
22063c6d
编写于
3月 04, 2021
作者:
T
ThreadDao
提交者:
yefu.chen
3月 04, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix TestThread
Signed-off-by:
N
ThreadDao
<
yufen.zong@zilliz.com
>
上级
dec0b40a
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
13 addition
and
13 deletion
+13
-13
tests/python_test/collection/test_create_collection.py
tests/python_test/collection/test_create_collection.py
+1
-1
tests/python_test/collection/test_describe_collection.py
tests/python_test/collection/test_describe_collection.py
+1
-1
tests/python_test/collection/test_drop_collection.py
tests/python_test/collection/test_drop_collection.py
+1
-1
tests/python_test/collection/test_has_collection.py
tests/python_test/collection/test_has_collection.py
+1
-1
tests/python_test/collection/test_list_collections.py
tests/python_test/collection/test_list_collections.py
+1
-1
tests/python_test/entity/test_search.py
tests/python_test/entity/test_search.py
+2
-2
tests/python_test/test_flush.py
tests/python_test/test_flush.py
+1
-1
tests/python_test/test_index.py
tests/python_test/test_index.py
+2
-2
tests/python_test/utils.py
tests/python_test/utils.py
+3
-3
未找到文件。
tests/python_test/collection/test_create_collection.py
浏览文件 @
22063c6d
...
@@ -165,7 +165,7 @@ class TestCreateCollection:
...
@@ -165,7 +165,7 @@ class TestCreateCollection:
connect
.
create_collection
(
collection_name
,
default_fields
)
connect
.
create_collection
(
collection_name
,
default_fields
)
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
t
=
Test
Thread
(
target
=
create
,
args
=
())
t
=
My
Thread
(
target
=
create
,
args
=
())
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/collection/test_describe_collection.py
浏览文件 @
22063c6d
...
@@ -121,7 +121,7 @@ class TestDescribeCollection:
...
@@ -121,7 +121,7 @@ class TestDescribeCollection:
connect
.
describe_collection
(
collection_name
)
connect
.
describe_collection
(
collection_name
)
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
t
=
Test
Thread
(
target
=
get_info
)
t
=
My
Thread
(
target
=
get_info
)
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/collection/test_drop_collection.py
浏览文件 @
22063c6d
...
@@ -74,7 +74,7 @@ class TestDropCollection:
...
@@ -74,7 +74,7 @@ class TestDropCollection:
connect
.
create_collection
(
collection_name
,
default_fields
)
connect
.
create_collection
(
collection_name
,
default_fields
)
connect
.
drop_collection
(
collection_name
)
connect
.
drop_collection
(
collection_name
)
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
t
=
Test
Thread
(
target
=
create
,
args
=
())
t
=
My
Thread
(
target
=
create
,
args
=
())
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/collection/test_has_collection.py
浏览文件 @
22063c6d
...
@@ -68,7 +68,7 @@ class TestHasCollection:
...
@@ -68,7 +68,7 @@ class TestHasCollection:
assert
connect
.
has_collection
(
collection_name
)
assert
connect
.
has_collection
(
collection_name
)
# assert not assert_collection(connect, collection_name)
# assert not assert_collection(connect, collection_name)
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
t
=
Test
Thread
(
target
=
has
,
args
=
())
t
=
My
Thread
(
target
=
has
,
args
=
())
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/collection/test_list_collections.py
浏览文件 @
22063c6d
...
@@ -91,7 +91,7 @@ class TestListCollections:
...
@@ -91,7 +91,7 @@ class TestListCollections:
assert
collection_name
in
connect
.
list_collections
()
assert
collection_name
in
connect
.
list_collections
()
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
t
=
Test
Thread
(
target
=
_list
)
t
=
My
Thread
(
target
=
_list
)
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/entity/test_search.py
浏览文件 @
22063c6d
...
@@ -883,7 +883,7 @@ class TestSearchBase:
...
@@ -883,7 +883,7 @@ class TestSearchBase:
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
milvus
=
get_milvus
(
args
[
"ip"
],
args
[
"port"
],
handler
=
args
[
"handler"
])
milvus
=
get_milvus
(
args
[
"ip"
],
args
[
"port"
],
handler
=
args
[
"handler"
])
t
=
Test
Thread
(
target
=
search
,
args
=
(
milvus
,))
t
=
My
Thread
(
target
=
search
,
args
=
(
milvus
,))
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
@@ -918,7 +918,7 @@ class TestSearchBase:
...
@@ -918,7 +918,7 @@ class TestSearchBase:
assert
res
[
0
].
_distances
[
0
]
<
epsilon
assert
res
[
0
].
_distances
[
0
]
<
epsilon
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
t
=
Test
Thread
(
target
=
search
,
args
=
(
milvus
,))
t
=
My
Thread
(
target
=
search
,
args
=
(
milvus
,))
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/test_flush.py
浏览文件 @
22063c6d
...
@@ -269,7 +269,7 @@ class TestFlushBase:
...
@@ -269,7 +269,7 @@ class TestFlushBase:
milvus
.
flush
([
collection
])
milvus
.
flush
([
collection
])
logging
.
error
(
"end flush"
)
logging
.
error
(
"end flush"
)
p
=
Test
Thread
(
target
=
flush
,
args
=
())
p
=
My
Thread
(
target
=
flush
,
args
=
())
p
.
start
()
p
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
logging
.
error
(
"start count"
)
logging
.
error
(
"start count"
)
...
...
tests/python_test/test_index.py
浏览文件 @
22063c6d
...
@@ -170,7 +170,7 @@ class TestIndexBase:
...
@@ -170,7 +170,7 @@ class TestIndexBase:
threads
=
[]
threads
=
[]
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
m
=
get_milvus
(
host
=
args
[
"ip"
],
port
=
args
[
"port"
],
handler
=
args
[
"handler"
])
m
=
get_milvus
(
host
=
args
[
"ip"
],
port
=
args
[
"port"
],
handler
=
args
[
"handler"
])
t
=
Test
Thread
(
target
=
build
,
args
=
(
m
,))
t
=
My
Thread
(
target
=
build
,
args
=
(
m
,))
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
@@ -330,7 +330,7 @@ class TestIndexBase:
...
@@ -330,7 +330,7 @@ class TestIndexBase:
threads
=
[]
threads
=
[]
for
i
in
range
(
threads_num
):
for
i
in
range
(
threads_num
):
m
=
get_milvus
(
host
=
args
[
"ip"
],
port
=
args
[
"port"
],
handler
=
args
[
"handler"
])
m
=
get_milvus
(
host
=
args
[
"ip"
],
port
=
args
[
"port"
],
handler
=
args
[
"handler"
])
t
=
Test
Thread
(
target
=
build
,
args
=
(
m
,))
t
=
My
Thread
(
target
=
build
,
args
=
(
m
,))
threads
.
append
(
t
)
threads
.
append
(
t
)
t
.
start
()
t
.
start
()
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
...
...
tests/python_test/utils.py
浏览文件 @
22063c6d
...
@@ -989,19 +989,19 @@ def compare_list_elements(_first, _second):
...
@@ -989,19 +989,19 @@ def compare_list_elements(_first, _second):
return
True
return
True
class
Test
Thread
(
threading
.
Thread
):
class
My
Thread
(
threading
.
Thread
):
def
__init__
(
self
,
target
,
args
=
()):
def
__init__
(
self
,
target
,
args
=
()):
threading
.
Thread
.
__init__
(
self
,
target
=
target
,
args
=
args
)
threading
.
Thread
.
__init__
(
self
,
target
=
target
,
args
=
args
)
def
run
(
self
):
def
run
(
self
):
self
.
exc
=
None
self
.
exc
=
None
try
:
try
:
super
(
Test
Thread
,
self
).
run
()
super
(
My
Thread
,
self
).
run
()
except
BaseException
as
e
:
except
BaseException
as
e
:
self
.
exc
=
e
self
.
exc
=
e
logging
.
error
(
traceback
.
format_exc
())
logging
.
error
(
traceback
.
format_exc
())
def
join
(
self
):
def
join
(
self
):
super
(
Test
Thread
,
self
).
join
()
super
(
My
Thread
,
self
).
join
()
if
self
.
exc
:
if
self
.
exc
:
raise
self
.
exc
raise
self
.
exc
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录