提交 ac186cc0 编写于 作者: C cai.zhang 提交者: yefu.chen

Check field dim when inserting

Signed-off-by: Ncai.zhang <cai.zhang@zilliz.com>
上级 55fc3f56
......@@ -370,6 +370,7 @@ class TestInsertBase:
res = connect.get_collection_stats(collection)
assert res[row_count] == 2 * default_nb
@pytest.mark.tags("0331")
def test_insert_dim_not_matched(self, connect, collection):
'''
target: test insert entities, the vector dimension is not equal to the collection dimension
......@@ -378,7 +379,7 @@ class TestInsertBase:
'''
vectors = gen_vectors(default_nb, int(default_dim) // 2)
insert_entities = copy.deepcopy(default_entities)
insert_entities[-1][default_float_vec_field_name] = vectors
insert_entities[-1]["values"] = vectors
# logging.getLogger().info(len(insert_entities[-1][default_float_vec_field_name][0]))
with pytest.raises(Exception) as e:
connect.insert(collection, insert_entities)
......
......@@ -2,7 +2,7 @@ grpcio==1.26.0
grpcio-tools==1.26.0
numpy==1.18.1
pytest-cov==2.8.1
pymilvus-distributed==0.0.37
pymilvus-distributed==0.0.39
sklearn==0.0
pytest==4.5.0
pytest-timeout==1.3.3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册