Skip to content

Commit

Permalink
test: update test cases (#31253)
Browse files Browse the repository at this point in the history
Signed-off-by: nico <[email protected]>
  • Loading branch information
NicoYuan1986 authored Mar 15, 2024
1 parent 50bfde9 commit 75a86bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions tests/python_client/testcases/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3072,7 +3072,7 @@ def test_collection_describe(self):
'element_type': 0},
{'field_id': 104, 'name': 'float_vector', 'description': '', 'type': 101,
'params': {'dim': 128}, 'element_type': 0}],
'aliases': [], 'consistency_level': 0, 'properties': {}, 'num_partitions': 1}
'aliases': [], 'consistency_level': 0, 'properties': {}, 'num_partitions': 1, 'enable_dynamic_field': False}
res = collection_w.describe()[0]
del res['collection_id']
log.info(res)
Expand Down Expand Up @@ -4040,21 +4040,21 @@ def test_collection_array_field_all_datatype(self):
{"field_id": 101, "name": "float_vector", "description": "", "type": 101,
"params": {"dim": ct.default_dim}, "element_type": 0},
{"field_id": 102, "name": "int8_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 2},
"params": {"max_capacity": 2000}, "element_type": 2},
{"field_id": 103, "name": "int16_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 3},
"params": {"max_capacity": 2000}, "element_type": 3},
{"field_id": 104, "name": "int32_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 4},
"params": {"max_capacity": 2000}, "element_type": 4},
{"field_id": 105, "name": "int64_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 5},
"params": {"max_capacity": 2000}, "element_type": 5},
{"field_id": 106, "name": "bool_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 1},
"params": {"max_capacity": 2000}, "element_type": 1},
{"field_id": 107, "name": "float_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 10},
"params": {"max_capacity": 2000}, "element_type": 10},
{"field_id": 108, "name": "double_array", "description": "", "type": 22,
"params": {"max_capacity": "2000"}, "element_type": 11},
"params": {"max_capacity": 2000}, "element_type": 11},
{"field_id": 109, "name": "string_array", "description": "", "type": 22,
"params": {"max_length": "100", "max_capacity": "2000"}, "element_type": 21}
"params": {"max_length": 100, "max_capacity": 2000}, "element_type": 21}
]
assert res["fields"] == fields

Expand Down
4 changes: 2 additions & 2 deletions tests/python_client/testcases/test_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_delete_expr_none(self):
"""
# init collection with tmp_nb default data
collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0]
error = {ct.err_code: 0, ct.err_msg: "expr cannot be None"}
error = {ct.err_code: 1, ct.err_msg: "expr cannot be None"}
collection_w.delete(expr=None, check_task=CheckTasks.err_res, check_items=error)

@pytest.mark.tags(CaseLabel.L2)
Expand All @@ -121,7 +121,7 @@ def test_delete_expr_non_string(self, expr):
"""
# init collection with tmp_nb default data
collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0]
error = {ct.err_code: 0, ct.err_msg: f"expr value {expr} is illegal"}
error = {ct.err_code: 1, ct.err_msg: f"expr value {expr} is illegal"}
collection_w.delete(expr, check_task=CheckTasks.err_res, check_items=error)

@pytest.mark.tags(CaseLabel.L2)
Expand Down

0 comments on commit 75a86bc

Please sign in to comment.