diff --git a/tests/python_client/chaos/checker.py b/tests/python_client/chaos/checker.py index 5f7f085567..e5186993fa 100644 --- a/tests/python_client/chaos/checker.py +++ b/tests/python_client/chaos/checker.py @@ -580,7 +580,7 @@ class BulkInsertChecker(Checker): def __init__(self, collection_name=None, files=[]): if collection_name is None: - collection_name = cf.gen_unique_str("BulkLoadChecker_") + collection_name = cf.gen_unique_str("BulkInsertChecker_") super().__init__(collection_name=collection_name) self.utility_wrap = ApiUtilityWrapper() self.schema = cf.gen_default_collection_schema() @@ -597,9 +597,9 @@ class BulkInsertChecker(Checker): @trace() def bulk_insert(self): - task_ids, result = self.utility_wrap.bulk_insert(collection_name=self.c_name, + task_ids, result = self.utility_wrap.do_bulk_insert(collection_name=self.c_name, files=self.files) - completed, result = self.utility_wrap.wait_for_bulk_insert_tasks_completed(task_ids=task_ids, timeout=60) + completed, result = self.utility_wrap.wait_for_bulk_insert_tasks_completed(task_ids=[task_ids], timeout=60) return task_ids, completed @exception_handler() diff --git a/tests/python_client/chaos/test_chaos_bulk_insert.py b/tests/python_client/chaos/test_chaos_bulk_insert.py index 9fdddcf4b0..436957516b 100644 --- a/tests/python_client/chaos/test_chaos_bulk_insert.py +++ b/tests/python_client/chaos/test_chaos_bulk_insert.py @@ -119,15 +119,16 @@ class TestChaos(TestChaosBase): entity = dict(zip(fields_name, entity_value)) entities.append(entity) data_dict = {"rows": entities} - file_name = "/tmp/ci_logs/bulk_insert_data_source.json" - files = [file_name] + data_source = "/tmp/ci_logs/bulk_insert_data_source.json" + file_name = "bulk_insert_data_source.json" + files = ["bulk_insert_data_source.json"] #TODO: npy file type is not supported so far log.info("generate bulk load file") - with open(file_name, "w") as f: + with open(data_source, "w") as f: f.write(json.dumps(data_dict, indent=4)) log.info("upload file to minio") client = Minio(minio_endpoint, access_key="minioadmin", secret_key="minioadmin", secure=False) - client.fput_object(bucket_name, file_name, file_name) + client.fput_object(bucket_name, file_name, data_source) self.health_checkers[Op.bulk_insert].update(schema=schema, files=files) log.info("prepare data for bulk load done")