Skip to content

Commit

Permalink
Update some assert for sdk updated
Browse files Browse the repository at this point in the history
Signed-off-by: yanliang567 <[email protected]>
  • Loading branch information
yanliang567 committed Aug 20, 2024
1 parent eba5237 commit da823e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/python_client/base/collection_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ def upsert(self, data, partition_name=None, timeout=None, check_task=None, check
return res, check_result

@trace()
def compact(self, timeout=None, check_task=None, check_items=None, **kwargs):
def compact(self, is_clustering=False, timeout=None, check_task=None, check_items=None, **kwargs):
timeout = TIMEOUT if timeout is None else timeout
func_name = sys._getframe().f_code.co_name
res, check = api_request([self.collection.compact, timeout], **kwargs)
res, check = api_request([self.collection.compact, is_clustering, timeout], **kwargs)
check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run()
return res, check_result

Expand Down
2 changes: 1 addition & 1 deletion tests/python_client/testcases/test_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def test_insert_exceed_varchar_limit(self):
data = [vectors, ["limit_1___________",
"limit_2___________"], ['1', '2']]
error = {ct.err_code: 999,
ct.err_msg: "invalid input, length of string exceeds max length"}
ct.err_msg: "length of string exceeds max length"}
collection_w.insert(
data, check_task=CheckTasks.err_res, check_items=error)

Expand Down
4 changes: 2 additions & 2 deletions tests/python_client/testcases/test_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ def test_index_process_collection_empty(self):
cw = self.init_collection_wrap(name=c_name)
self.index_wrap.init_index(cw.collection, default_field_name, default_index_params)
res, _ = self.utility_wrap.index_building_progress(c_name)
exp_res = {'total_rows': 0, 'indexed_rows': 0, 'pending_index_rows': 0}
exp_res = {'total_rows': 0, 'indexed_rows': 0, 'pending_index_rows': 0, 'state': 'Finished'}
assert res == exp_res

@pytest.mark.tags(CaseLabel.L2)
Expand Down Expand Up @@ -822,7 +822,7 @@ def test_wait_index_collection_empty(self):
cw.create_index(default_field_name, default_index_params)
assert self.utility_wrap.wait_for_index_building_complete(c_name)[0]
res, _ = self.utility_wrap.index_building_progress(c_name)
exp_res = {'total_rows': 0, 'indexed_rows': 0, 'pending_index_rows': 0}
exp_res = {'total_rows': 0, 'indexed_rows': 0, 'pending_index_rows': 0, 'state': 'Finished'}
assert res == exp_res

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

0 comments on commit da823e9

Please sign in to comment.