Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
9c5c8f35
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,发现更多精彩内容 >>
提交
9c5c8f35
编写于
3月 02, 2021
作者:
N
neza2017
提交者:
yefu.chen
3月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add tag of "0331" for test_index.py
Signed-off-by:
N
neza2017
<
yefu.chen@zilliz.com
>
上级
ae432436
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
22 addition
and
0 deletion
+22
-0
tests/python_test/test_index.py
tests/python_test/test_index.py
+22
-0
未找到文件。
tests/python_test/test_index.py
浏览文件 @
9c5c8f35
...
...
@@ -58,6 +58,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_create_index_on_field_not_existed
(
self
,
connect
,
collection
,
get_simple_index
):
'''
target: test create index interface
...
...
@@ -69,6 +70,7 @@ class TestIndexBase:
with
pytest
.
raises
(
Exception
)
as
e
:
connect
.
create_index
(
collection
,
tmp_field_name
,
get_simple_index
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
def
test_create_index_on_field
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -81,6 +83,7 @@ class TestIndexBase:
with
pytest
.
raises
(
Exception
)
as
e
:
connect
.
create_index
(
collection
,
tmp_field_name
,
get_simple_index
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_index_no_vectors
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -120,6 +123,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_create_index_without_connect
(
self
,
dis_connect
,
collection
):
'''
target: test create index without connection
...
...
@@ -173,6 +177,7 @@ class TestIndexBase:
for
t
in
threads
:
t
.
join
()
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_create_index_collection_not_existed
(
self
,
connect
):
'''
target: test create index interface when collection name not existed
...
...
@@ -200,6 +205,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_same_index_repeatedly
(
self
,
connect
,
collection
,
get_simple_index
):
...
...
@@ -242,6 +248,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_index_no_vectors_ip
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -330,6 +337,7 @@ class TestIndexBase:
for
t
in
threads
:
t
.
join
()
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_create_index_collection_not_existed_ip
(
self
,
connect
,
collection
):
'''
target: test create index interface when collection name not existed
...
...
@@ -358,6 +366,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
index
==
default_index
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_same_index_repeatedly_ip
(
self
,
connect
,
collection
):
...
...
@@ -421,6 +430,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
not
index
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
def
test_drop_index_without_connect
(
self
,
dis_connect
,
collection
):
'''
...
...
@@ -431,6 +441,7 @@ class TestIndexBase:
with
pytest
.
raises
(
Exception
)
as
e
:
dis_connect
.
drop_index
(
collection
,
field_name
)
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_drop_index_collection_not_existed
(
self
,
connect
):
'''
target: test drop index interface when collection name not existed
...
...
@@ -442,6 +453,7 @@ class TestIndexBase:
with
pytest
.
raises
(
Exception
)
as
e
:
connect
.
drop_index
(
collection_name
,
field_name
)
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_drop_index_collection_not_create
(
self
,
connect
,
collection
):
'''
target: test drop index interface when index not created
...
...
@@ -451,6 +463,7 @@ class TestIndexBase:
# no create index
connect
.
drop_index
(
collection
,
field_name
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
def
test_create_drop_index_repeatedly
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -489,6 +502,7 @@ class TestIndexBase:
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
not
index
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
def
test_drop_index_without_connect_ip
(
self
,
dis_connect
,
collection
):
'''
...
...
@@ -499,6 +513,7 @@ class TestIndexBase:
with
pytest
.
raises
(
Exception
)
as
e
:
dis_connect
.
drop_index
(
collection
,
field_name
)
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_drop_index_collection_not_create_ip
(
self
,
connect
,
collection
):
'''
target: test drop index interface when index not created
...
...
@@ -509,6 +524,7 @@ class TestIndexBase:
# no create index
connect
.
drop_index
(
collection
,
field_name
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
def
test_create_drop_index_repeatedly_ip
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -722,12 +738,14 @@ class TestIndexInvalid(object):
def
get_collection_name
(
self
,
request
):
yield
request
.
param
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
1
)
def
test_create_index_with_invalid_collection_name
(
self
,
connect
,
get_collection_name
):
collection_name
=
get_collection_name
with
pytest
.
raises
(
Exception
)
as
e
:
connect
.
create_index
(
collection_name
,
field_name
,
default_index
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
1
)
def
test_drop_index_with_invalid_collection_name
(
self
,
connect
,
get_collection_name
):
collection_name
=
get_collection_name
...
...
@@ -780,6 +798,7 @@ class TestIndexAsync:
******************************************************************
"""
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_index
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -795,6 +814,7 @@ class TestIndexAsync:
# TODO:
logging
.
getLogger
().
info
(
res
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_index_drop
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -808,6 +828,7 @@ class TestIndexAsync:
logging
.
getLogger
().
info
(
"DROP"
)
connect
.
drop_collection
(
collection
)
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
level
(
2
)
def
test_create_index_with_invalid_collection_name
(
self
,
connect
):
collection_name
=
" "
...
...
@@ -815,6 +836,7 @@ class TestIndexAsync:
with
pytest
.
raises
(
Exception
)
as
e
:
res
=
future
.
result
()
@
pytest
.
mark
.
tags
(
"0331"
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_index_callback
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录