Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
ac0b8785
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
ac0b8785
编写于
5月 21, 2021
作者:
S
sunby
提交者:
GitHub
5月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update describe_index in python tests (#5328)
Signed-off-by:
N
sunby
<
bingyi.sun@zilliz.com
>
上级
f6ab3c81
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
72 addition
and
41 deletion
+72
-41
tests/python_test/collection/test_collection_stats.py
tests/python_test/collection/test_collection_stats.py
+3
-1
tests/python_test/collection/test_describe_collection.py
tests/python_test/collection/test_describe_collection.py
+1
-1
tests/python_test/collection/test_load_collection.py
tests/python_test/collection/test_load_collection.py
+3
-2
tests/python_test/entity/test_insert.py
tests/python_test/entity/test_insert.py
+12
-6
tests/python_test/requirements.txt
tests/python_test/requirements.txt
+1
-1
tests/python_test/test_index.py
tests/python_test/test_index.py
+46
-28
tests/python_test/test_mix.py
tests/python_test/test_mix.py
+3
-2
tests/python_test/utils.py
tests/python_test/utils.py
+3
-0
未找到文件。
tests/python_test/collection/test_collection_stats.py
浏览文件 @
ac0b8785
...
...
@@ -395,10 +395,12 @@ class TestGetCollectionStats:
for
i
in
range
(
collection_num
):
stats
=
connect
.
get_collection_stats
(
collection_list
[
i
])
assert
stats
[
row_count
]
==
default_nb
index
=
connect
.
describe_index
(
collection_list
[
i
],
default_float_vec_field_name
)
index
=
connect
.
describe_index
(
collection_list
[
i
],
""
)
if
i
%
2
:
create_target_index
(
index_1
,
default_float_vec_field_name
)
assert
index
==
index_1
else
:
create_target_index
(
index_2
,
default_float_vec_field_name
)
assert
index
==
index_2
# break
connect
.
drop_collection
(
collection_list
[
i
])
tests/python_test/collection/test_describe_collection.py
浏览文件 @
ac0b8785
...
...
@@ -69,7 +69,7 @@ class TestDescribeCollection:
def
test_describe_collection_after_index_created
(
self
,
connect
,
collection
,
get_simple_index
):
connect
.
create_index
(
collection
,
default_float_vec_field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
default_float_vec_field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
assert
index
[
"index_type"
]
==
get_simple_index
[
"index_type"
]
assert
index
[
"metric_type"
]
==
get_simple_index
[
"metric_type"
]
assert
index
[
"params"
]
==
get_simple_index
[
"params"
]
...
...
tests/python_test/collection/test_load_collection.py
浏览文件 @
ac0b8785
...
...
@@ -67,7 +67,8 @@ class TestLoadCollection:
connect
.
create_index
(
binary_collection
,
default_binary_vec_field_name
,
get_binary_index
)
else
:
connect
.
create_index
(
binary_collection
,
default_binary_vec_field_name
,
get_binary_index
)
index
=
connect
.
describe_index
(
binary_collection
,
default_binary_vec_field_name
)
index
=
connect
.
describe_index
(
binary_collection
,
""
)
create_target_index
(
get_binary_index
,
default_binary_vec_field_name
)
assert
index
==
get_binary_index
connect
.
load_collection
(
binary_collection
)
connect
.
release_collection
(
binary_collection
)
...
...
@@ -666,4 +667,4 @@ class TestLoadPartitionInvalid(object):
def
test_release_partition_with_invalid_partition_name
(
self
,
connect
,
collection
,
get_partition_name
):
partition_name
=
get_partition_name
with
pytest
.
raises
(
Exception
)
as
e
:
connect
.
load_partitions
(
collection
,
[
partition_name
])
\ No newline at end of file
connect
.
load_partitions
(
collection
,
[
partition_name
])
tests/python_test/entity/test_insert.py
浏览文件 @
ac0b8785
...
...
@@ -131,7 +131,8 @@ class TestInsertBase:
connect
.
flush
([
collection
])
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
...
...
@@ -146,7 +147,8 @@ class TestInsertBase:
ids
=
connect
.
insert
(
collection
,
default_entities
)
assert
len
(
ids
)
==
default_nb
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
...
...
@@ -605,7 +607,8 @@ class TestInsertBinary:
ids
=
connect
.
insert
(
binary_collection
,
default_binary_entities
)
assert
len
(
ids
)
==
default_nb
connect
.
flush
([
binary_collection
])
index
=
connect
.
describe_index
(
binary_collection
,
binary_field_name
)
index
=
connect
.
describe_index
(
binary_collection
,
""
)
create_target_index
(
get_binary_index
,
binary_field_name
)
assert
index
==
get_binary_index
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
...
...
@@ -619,7 +622,8 @@ class TestInsertBinary:
assert
len
(
ids
)
==
default_nb
connect
.
flush
([
binary_collection
])
connect
.
create_index
(
binary_collection
,
binary_field_name
,
get_binary_index
)
index
=
connect
.
describe_index
(
binary_collection
,
binary_field_name
)
index
=
connect
.
describe_index
(
binary_collection
,
""
)
create_target_index
(
get_binary_index
,
binary_field_name
)
assert
index
==
get_binary_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -824,7 +828,8 @@ class TestInsertMultiCollections:
ids
=
connect
.
insert
(
collection_name
,
default_entity
)
assert
len
(
ids
)
==
1
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
connect
.
drop_collection
(
collection_name
)
...
...
@@ -842,7 +847,8 @@ class TestInsertMultiCollections:
connect
.
flush
([
collection
])
connect
.
create_index
(
collection_name
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection_name
,
field_name
)
index
=
connect
.
describe_index
(
collection_name
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
stats
=
connect
.
get_collection_stats
(
collection
)
assert
stats
[
row_count
]
==
1
...
...
tests/python_test/requirements.txt
浏览文件 @
ac0b8785
...
...
@@ -10,7 +10,7 @@ allure-pytest==2.7.0
pytest-print==0.2.1
pytest-level==0.1.1
pytest-xdist==2.2.1
pymilvus-distributed==0.0.6
3
pymilvus-distributed==0.0.6
5
pytest-rerunfailures==9.1.1
git+https://github.com/Projectplace/pytest-tags
ndg-httpsclient
...
...
tests/python_test/test_index.py
浏览文件 @
ac0b8785
...
...
@@ -58,7 +58,8 @@ class TestIndexBase:
ids
=
connect
.
insert
(
collection
,
default_entities
)
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -94,7 +95,8 @@ class TestIndexBase:
'''
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
...
...
@@ -108,7 +110,8 @@ class TestIndexBase:
ids
=
connect
.
insert
(
collection
,
default_entities
,
partition_tag
=
default_tag
)
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -124,7 +127,8 @@ class TestIndexBase:
connect
.
flush
([
collection
])
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
def
test_create_index_without_connect
(
self
,
dis_connect
,
collection
):
...
...
@@ -147,7 +151,7 @@ class TestIndexBase:
ids
=
connect
.
insert
(
collection
,
default_entities
)
connect
.
flush
([
collection
])
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
logging
.
getLogger
().
info
(
connect
.
describe_index
(
collection
,
field_name
))
logging
.
getLogger
().
info
(
connect
.
describe_index
(
collection
,
""
))
nq
=
get_nq
index_type
=
get_simple_index
[
"index_type"
]
search_param
=
get_search_param
(
index_type
)
...
...
@@ -169,7 +173,8 @@ class TestIndexBase:
def
build
(
connect
):
connect
.
create_index
(
collection
,
field_name
,
default_index
)
if
default_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
default_index
,
field_name
)
assert
index
==
default_index
threads_num
=
8
...
...
@@ -209,7 +214,8 @@ class TestIndexBase:
stats
=
connect
.
get_collection_stats
(
collection
)
assert
stats
[
"row_count"
]
==
default_nb
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -223,7 +229,8 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -241,7 +248,7 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
index
)
connect
.
release_collection
(
collection
)
connect
.
load_collection
(
collection
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
# assert index == indexs[-1]
assert
not
index
# FLAT is the last index_type, drop all indexes in server
...
...
@@ -260,7 +267,8 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
index
)
connect
.
release_collection
(
collection
)
connect
.
load_collection
(
collection
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
indexs
[
-
1
],
field_name
)
assert
index
==
indexs
[
-
1
]
# assert not index # FLAT is the last index_type, drop all indexes in server
...
...
@@ -276,7 +284,8 @@ class TestIndexBase:
get_simple_index
[
"metric_type"
]
=
"IP"
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -290,7 +299,8 @@ class TestIndexBase:
get_simple_index
[
"metric_type"
]
=
"IP"
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
...
...
@@ -305,7 +315,8 @@ class TestIndexBase:
get_simple_index
[
"metric_type"
]
=
"IP"
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -322,7 +333,8 @@ class TestIndexBase:
get_simple_index
[
"metric_type"
]
=
"IP"
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
if
get_simple_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
get_simple_index
,
field_name
)
assert
index
==
get_simple_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -339,7 +351,7 @@ class TestIndexBase:
get_simple_index
[
"metric_type"
]
=
metric_type
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
load_collection
(
collection
)
logging
.
getLogger
().
info
(
connect
.
describe_index
(
collection
,
field_name
))
logging
.
getLogger
().
info
(
connect
.
describe_index
(
collection
,
""
))
nq
=
get_nq
index_type
=
get_simple_index
[
"index_type"
]
search_param
=
get_search_param
(
index_type
)
...
...
@@ -361,7 +373,8 @@ class TestIndexBase:
default_index
[
"metric_type"
]
=
"IP"
connect
.
create_index
(
collection
,
field_name
,
default_index
)
if
default_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
default_index
,
field_name
)
assert
index
==
default_index
threads_num
=
8
...
...
@@ -402,7 +415,8 @@ class TestIndexBase:
stats
=
connect
.
get_collection_stats
(
collection
)
assert
stats
[
"row_count"
]
==
default_nb
if
default_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
default_index
,
field_name
)
assert
index
==
default_index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -417,7 +431,8 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
default_index
)
connect
.
create_index
(
collection
,
field_name
,
default_index
)
if
default_index
[
"index_type"
]
!=
"FLAT"
:
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
default_index
,
field_name
)
assert
index
==
default_index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -439,7 +454,7 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
index
)
connect
.
release_collection
(
collection
)
connect
.
load_collection
(
collection
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
# assert index == indexs[-1]
assert
not
index
...
...
@@ -458,7 +473,7 @@ class TestIndexBase:
# ids = connect.insert(collection, entities)
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
drop_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
assert
not
index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -471,7 +486,7 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
drop_index
(
collection
,
field_name
)
connect
.
drop_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
assert
not
index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -527,7 +542,7 @@ class TestIndexBase:
get_simple_index
[
"metric_type"
]
=
"IP"
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
drop_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
assert
not
index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -541,7 +556,7 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
drop_index
(
collection
,
field_name
)
connect
.
drop_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
assert
not
index
@
pytest
.
mark
.
level
(
2
)
...
...
@@ -581,7 +596,8 @@ class TestIndexBase:
PQ_index
=
{
"index_type"
:
"IVF_PQ"
,
"params"
:
{
"nlist"
:
128
,
"m"
:
16
},
"metric_type"
:
"L2"
}
ids
=
connect
.
insert
(
collection
,
default_entities
)
connect
.
create_index
(
collection
,
field_name
,
PQ_index
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
PQ_index
,
field_name
)
assert
index
==
PQ_index
...
...
@@ -640,7 +656,8 @@ class TestIndexBinary:
'''
ids
=
connect
.
insert
(
binary_collection
,
default_binary_entities
)
connect
.
create_index
(
binary_collection
,
binary_field_name
,
get_jaccard_index
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
binary_field_name
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
""
)
create_target_index
(
get_jaccard_index
,
binary_field_name
)
assert
binary_index
==
get_jaccard_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -654,7 +671,8 @@ class TestIndexBinary:
connect
.
create_partition
(
binary_collection
,
default_tag
)
ids
=
connect
.
insert
(
binary_collection
,
default_binary_entities
,
partition_tag
=
default_tag
)
connect
.
create_index
(
binary_collection
,
binary_field_name
,
get_jaccard_index
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
binary_field_name
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
""
)
create_target_index
(
get_jaccard_index
,
binary_field_name
)
assert
binary_index
==
get_jaccard_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -752,7 +770,7 @@ class TestIndexBinary:
stats
=
connect
.
get_collection_stats
(
binary_collection
)
logging
.
getLogger
().
info
(
stats
)
connect
.
drop_index
(
binary_collection
,
binary_field_name
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
binary_field_name
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
""
)
assert
not
binary_index
@
pytest
.
mark
.
tags
(
CaseLabel
.
tags_smoke
)
...
...
@@ -767,7 +785,7 @@ class TestIndexBinary:
connect
.
flush
([
binary_collection
])
connect
.
create_index
(
binary_collection
,
binary_field_name
,
get_jaccard_index
)
connect
.
drop_index
(
binary_collection
,
binary_field_name
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
binary_field_name
)
binary_index
=
connect
.
describe_index
(
binary_collection
,
""
)
assert
not
binary_index
...
...
tests/python_test/test_mix.py
浏览文件 @
ac0b8785
...
...
@@ -31,7 +31,8 @@ class TestMixBase:
assert
len
(
ids
)
==
nb
connect
.
flush
([
collection
])
connect
.
create_index
(
collection
,
default_float_vec_field_name
,
default_index
)
index
=
connect
.
describe_index
(
collection
,
default_float_vec_field_name
)
index
=
connect
.
describe_index
(
collection
,
""
)
create_target_index
(
default_index
,
default_float_vec_field_name
)
assert
index
==
default_index
query
,
vecs
=
gen_query_vectors
(
default_float_vec_field_name
,
entities
,
default_top_k
,
nq
)
connect
.
load_collection
(
collection
)
...
...
@@ -193,4 +194,4 @@ def check_id_result(result, id):
if
len
(
result
)
>=
limit_in
:
return
id
in
ids
[:
limit_in
]
else
:
return
id
in
ids
\ No newline at end of file
return
id
in
ids
tests/python_test/utils.py
浏览文件 @
ac0b8785
...
...
@@ -68,6 +68,8 @@ default_index_params = [
{
"nlist"
:
128
}
]
def
create_target_index
(
index
,
field_name
):
index
[
"field_name"
]
=
field_name
def
index_cpu_not_support
():
return
[
"IVF_SQ8_HYBRID"
]
...
...
@@ -1018,3 +1020,4 @@ class MyThread(threading.Thread):
class
CaseLabel
:
tags_smoke
=
"smoke"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录