Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
c440b9e8
M
milvus
项目概览
milvus
/
milvus
10 个月 前同步成功
通知
260
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
c440b9e8
编写于
6月 16, 2021
作者:
B
binbin
提交者:
GitHub
6月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update test case for interface change (#5794)
Signed-off-by:
N
Binbin Lv
<
binbin.lv@zilliz.com
>
上级
443084ae
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
28 deletion
+23
-28
tests20/python_client/base/collection_wrapper.py
tests20/python_client/base/collection_wrapper.py
+16
-16
tests20/python_client/base/index_wrapper.py
tests20/python_client/base/index_wrapper.py
+5
-8
tests20/python_client/base/partition_wrapper.py
tests20/python_client/base/partition_wrapper.py
+2
-4
未找到文件。
tests20/python_client/base/collection_wrapper.py
浏览文件 @
c440b9e8
...
...
@@ -77,11 +77,11 @@ class ApiCollectionWrapper:
log
.
info
(
"Dropping collection failed"
)
return
res
,
check_result
def
load
(
self
,
field_names
=
None
,
index_names
=
None
,
partition_names
=
None
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
def
load
(
self
,
partition_names
=
None
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
log
.
info
(
"loading data"
)
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
check
=
api_request
([
self
.
collection
.
load
,
field_names
,
index_names
,
partition_names
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
field_names
=
field_names
,
index_names
=
index_names
,
res
,
check
=
api_request
([
self
.
collection
.
load
,
partition_names
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
partition_names
=
partition_names
,
**
kwargs
).
run
()
if
check_result
:
log
.
info
(
"loaded data"
)
...
...
@@ -160,27 +160,27 @@ class ApiCollectionWrapper:
# check_result = CheckFunc(res, func_name, check_task, check_items, check).run()
# return res, check_result
def
index
(
self
,
index_name
=
""
,
check_task
=
None
,
check_items
=
None
):
def
index
(
self
,
check_task
=
None
,
check_items
=
None
):
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
check
=
api_request
([
self
.
collection
.
index
,
index_name
])
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
index_name
=
index_name
).
run
()
res
,
check
=
api_request
([
self
.
collection
.
index
])
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
).
run
()
return
res
,
check_result
def
create_index
(
self
,
field_name
,
index_params
,
index_name
=
""
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
def
create_index
(
self
,
field_name
,
index_params
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
check
=
api_request
([
self
.
collection
.
create_index
,
field_name
,
index_params
,
index_name
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
field_name
=
field_name
,
index_params
=
index_params
,
index_name
=
index_name
,
**
kwargs
).
run
()
res
,
check
=
api_request
([
self
.
collection
.
create_index
,
field_name
,
index_params
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
field_name
=
field_name
,
index_params
=
index_params
,
**
kwargs
).
run
()
return
res
,
check_result
def
has_index
(
self
,
index_name
=
""
,
check_task
=
None
,
check_items
=
None
):
def
has_index
(
self
,
check_task
=
None
,
check_items
=
None
):
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
check
=
api_request
([
self
.
collection
.
has_index
,
index_name
])
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
index_name
=
index_name
).
run
()
res
,
check
=
api_request
([
self
.
collection
.
has_index
])
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
).
run
()
return
res
,
check_result
def
drop_index
(
self
,
index_name
=
""
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
def
drop_index
(
self
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
check
=
api_request
([
self
.
collection
.
drop_index
,
index_name
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
index_name
=
index_name
,
**
kwargs
).
run
()
res
,
check
=
api_request
([
self
.
collection
.
drop_index
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
check
,
**
kwargs
).
run
()
return
res
,
check_result
tests20/python_client/base/index_wrapper.py
浏览文件 @
c440b9e8
...
...
@@ -10,13 +10,14 @@ from utils.api_request import api_request
class
ApiIndexWrapper
:
index
=
None
def
init_index
(
self
,
collection
,
field_name
,
index_params
,
name
=
""
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
def
init_index
(
self
,
collection
,
field_name
,
index_params
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
""" In order to distinguish the same name of index """
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
is_succ
=
api_request
([
Index
,
collection
,
field_name
,
index_params
,
name
],
**
kwargs
)
res
,
is_succ
=
api_request
([
Index
,
collection
,
field_name
,
index_params
],
**
kwargs
)
self
.
index
=
res
if
is_succ
is
True
else
None
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
is_succ
,
collection
=
collection
,
field_name
=
field_name
,
index_params
=
index_params
,
name
=
name
,
**
kwargs
).
run
()
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
is_succ
,
collection
=
collection
,
field_name
=
field_name
,
index_params
=
index_params
,
**
kwargs
).
run
()
return
res
,
check_result
def
drop
(
self
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
...
...
@@ -25,10 +26,6 @@ class ApiIndexWrapper:
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
is_succ
,
**
kwargs
).
run
()
return
res
,
check_result
@
property
def
name
(
self
):
return
self
.
index
.
name
@
property
def
params
(
self
):
return
self
.
index
.
params
...
...
tests20/python_client/base/partition_wrapper.py
浏览文件 @
c440b9e8
...
...
@@ -57,13 +57,11 @@ class ApiPartitionWrapper:
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
succ
,
**
kwargs
).
run
()
return
res
,
check_result
def
load
(
self
,
field_names
=
None
,
index_names
=
None
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
def
load
(
self
,
check_task
=
None
,
check_items
=
None
,
**
kwargs
):
func_name
=
sys
.
_getframe
().
f_code
.
co_name
res
,
succ
=
api_request
([
self
.
partition
.
load
,
field_names
,
index_names
],
**
kwargs
)
res
,
succ
=
api_request
([
self
.
partition
.
load
],
**
kwargs
)
check_result
=
ResponseChecker
(
res
,
func_name
,
check_task
,
check_items
,
is_succ
=
succ
,
field_names
=
field_names
,
index_names
=
index_names
,
**
kwargs
).
run
()
return
res
,
check_result
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录