Skip to content

Commit

Permalink
Merge bulkinsert partition key enable tests from 2.2.0 branch (#27372)
Browse files Browse the repository at this point in the history
Signed-off-by: yanliang567 <[email protected]>
  • Loading branch information
yanliang567 authored Sep 26, 2023
1 parent f1257cf commit 3e864d4
Show file tree
Hide file tree
Showing 6 changed files with 723 additions and 383 deletions.
18 changes: 18 additions & 0 deletions tests/python_client/base/utility_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,24 @@ def wait_all_pending_tasks_finished(self):
if task.task_id in pending_task_ids:
log.info(f"task {task.task_id} state transfer from pending to {task.state_name}")

def wait_index_build_completed(self, collection_name, timeout=None):
start = time.time()
if timeout is not None:
task_timeout = timeout
else:
task_timeout = TIMEOUT
end = time.time()
while end - start <= task_timeout:
time.sleep(0.5)
index_states, _ = self.index_building_progress(collection_name)
log.debug(f"index states: {index_states}")
if index_states["total_rows"] == index_states["indexed_rows"]:
log.info(f"index build completed")
return True
end = time.time()
log.info(f"index build timeout")
return False

def get_query_segment_info(self, collection_name, timeout=None, using="default", check_task=None, check_items=None):
timeout = TIMEOUT if timeout is None else timeout
func_name = sys._getframe().f_code.co_name
Expand Down
Loading

0 comments on commit 3e864d4

Please sign in to comment.