Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
552c6acb
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 搜索 >>
未验证
提交
552c6acb
编写于
7月 25, 2023
作者:
N
nico
提交者:
GitHub
7月 25, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update test cases (#25858)
Signed-off-by:
N
nico
<
cheng.yuan@zilliz.com
>
上级
fe1c0ffe
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
16 deletion
+16
-16
tests/python_client/requirements.txt
tests/python_client/requirements.txt
+1
-1
tests/python_client/testcases/test_insert.py
tests/python_client/testcases/test_insert.py
+3
-2
tests/python_client/testcases/test_search.py
tests/python_client/testcases/test_search.py
+12
-13
未找到文件。
tests/python_client/requirements.txt
浏览文件 @
552c6acb
...
...
@@ -12,7 +12,7 @@ allure-pytest==2.7.0
pytest-print==0.2.1
pytest-level==0.1.1
pytest-xdist==2.5.0
pymilvus==2.4.0.dev10
1
pymilvus==2.4.0.dev10
3
pytest-rerunfailures==9.1.1
git+https://github.com/Projectplace/pytest-tags
ndg-httpsclient
...
...
tests/python_client/testcases/test_insert.py
浏览文件 @
552c6acb
...
...
@@ -1187,10 +1187,11 @@ class TestInsertInvalid(TestcaseBase):
schema
=
cf
.
gen_collection_schema
([
string_field
,
embedding_field
],
auto_id
=
True
)
collection_w
=
self
.
init_collection_wrap
(
schema
=
schema
)
data
=
[[[
random
.
random
()
for
_
in
range
(
ct
.
default_dim
)]
for
_
in
range
(
2
)]]
error
=
{
ct
.
err_code
:
1
,
ct
.
err_msg
:
"the length (18) of 0th string exceeds max length (6)"
}
collection_w
.
insert
(
data
=
data
,
check_task
=
CheckTasks
.
err_res
,
check_items
=
error
)
res
=
collection_w
.
insert
(
data
=
data
)[
0
]
assert
res
.
insert_count
==
2
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
skip
(
"no error code provided now"
)
def
test_insert_over_resource_limit
(
self
):
"""
target: test insert over RPC limitation 64MB (67108864)
...
...
tests/python_client/testcases/test_search.py
浏览文件 @
552c6acb
...
...
@@ -1162,17 +1162,11 @@ class TestCollectionSearchInvalid(TestcaseBase):
dim
=
dim
,
is_index
=
False
)[
0
:
5
]
# 2. create index
default_index
=
{
"index_type"
:
"BIN_FLAT"
,
"params"
:
{
"nlist"
:
128
},
"metric_type"
:
metric
}
collection_w
.
create_index
(
"binary_vector"
,
default_index
)
collection_w
.
load
()
# 3. generate search vectors
binary_vectors
=
cf
.
gen_binary_vectors
(
nq
,
dim
)[
1
]
# 4. search and compare the distance
search_params
=
{
"metric_type"
:
metric
,
"params"
:
{
"nprobe"
:
10
,
"radius"
:
10
,
"range_filter"
:
1
}}
collection_w
.
search
(
binary_vectors
[:
nq
],
"binary_vector"
,
search_params
,
default_limit
,
collection_w
.
create_index
(
"binary_vector"
,
default_index
,
check_task
=
CheckTasks
.
err_res
,
check_items
=
{
"err_code"
:
1
,
"err_msg"
:
f
"invalid metric type"
})[
0
]
"err_msg"
:
"metric type not found or not supported, "
"supported: [HAMMING JACCARD]"
})
@
pytest
.
mark
.
tags
(
CaseLabel
.
L1
)
def
test_search_dynamic_compare_two_fields
(
self
):
...
...
@@ -1232,6 +1226,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
fixture
(
scope
=
"function"
,
params
=
[
"JACCARD"
,
"HAMMING"
,
"TANIMOTO"
])
def
metrics
(
self
,
request
):
if
request
.
param
==
"TANIMOTO"
:
pytest
.
skip
(
"TANIMOTO not supported now"
)
yield
request
.
param
@
pytest
.
fixture
(
scope
=
"function"
,
params
=
[
False
,
True
])
...
...
@@ -6007,6 +6003,8 @@ class TestCollectionRangeSearch(TestcaseBase):
@
pytest
.
fixture
(
scope
=
"function"
,
params
=
[
"JACCARD"
,
"HAMMING"
,
"TANIMOTO"
])
def
metrics
(
self
,
request
):
if
request
.
param
==
"TANIMOTO"
:
pytest
.
skip
(
"TANIMOTO not supported now"
)
yield
request
.
param
@
pytest
.
fixture
(
scope
=
"function"
,
params
=
[
False
,
True
])
...
...
@@ -8364,8 +8362,9 @@ class TestCollectionLoadOperation(TestcaseBase):
partition_w2
.
release
()
# search on collection
collection_w
.
search
(
vectors
[:
1
],
field_name
,
default_search_params
,
200
,
check_task
=
CheckTasks
.
check_search_results
,
check_items
=
{
"nq"
:
1
,
"limit"
:
0
})
check_task
=
CheckTasks
.
err_res
,
check_items
=
{
ct
.
err_code
:
1
,
ct
.
err_msg
:
"fail to get shard leaders from QueryCoord: collection not loaded"
})
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
xfail
(
reason
=
"issue #24446"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录