diff --git a/tests/python_client/milvus_client/test_milvus_client_collection.py b/tests/python_client/milvus_client/test_milvus_client_collection.py index f73c06d949..e2c730e796 100644 --- a/tests/python_client/milvus_client/test_milvus_client_collection.py +++ b/tests/python_client/milvus_client/test_milvus_client_collection.py @@ -137,8 +137,8 @@ class TestMilvusClientCollectionInvalid(TestMilvusClientV2Base): client = self._client() collection_name = cf.gen_unique_str(prefix) # 1. create collection - error = {ct.err_code: 65535, ct.err_msg: f"type param(max_length) should be specified for the " - f"field({default_primary_key_field_name}) of collection {collection_name}"} + error = {ct.err_code: 65535, ct.err_msg: f"type param(max_length) should be specified for " + f"varChar field(id) of collection {collection_name}"} self.create_collection(client, collection_name, default_dim, id_type="string", auto_id=True, check_task=CheckTasks.err_res, check_items=error) diff --git a/tests/python_client/testcases/async_milvus_client/test_partition_async.py b/tests/python_client/testcases/async_milvus_client/test_partition_async.py index 86cf94b430..e2eae89c35 100644 --- a/tests/python_client/testcases/async_milvus_client/test_partition_async.py +++ b/tests/python_client/testcases/async_milvus_client/test_partition_async.py @@ -608,11 +608,13 @@ class TestAsyncMilvusClientPartitionInvalid(TestMilvusClientV2Base): check_task=CheckTasks.err_res, check_items=error) partition_name = "" error = {ct.err_code: 200, ct.err_msg: f"partition not found[partition={partition_name}]"} - await async_client.release_partitions(collection_name, partition_name, - check_task=CheckTasks.err_res, check_items=error) + # await async_client.release_partitions(collection_name, partition_name, + # check_task=CheckTasks.err_res, check_items=error) + # https://github.com/milvus-io/milvus/issues/38223 # 3. drop action await async_client.drop_collection(collection_name) + class TestAsyncMilvusClientPartitionValid(TestMilvusClientV2Base): """ Test case of partition interface """ diff --git a/tests/python_client/testcases/test_collection.py b/tests/python_client/testcases/test_collection.py index 13d2354bdb..ecb3834564 100644 --- a/tests/python_client/testcases/test_collection.py +++ b/tests/python_client/testcases/test_collection.py @@ -3134,16 +3134,21 @@ class TestDescribeCollection(TestcaseBase): description = \ {'collection_name': c_name, 'auto_id': False, 'num_shards': ct.default_shards_num, 'description': '', 'fields': [ - {'field_id': 100, 'name': 'int64', 'description': '', 'type': 5, 'params': {}, 'is_primary': True}, - {'field_id': 101, 'name': 'float', 'description': '', 'type': 10, 'params': {}}, - {'field_id': 102, 'name': 'varchar', 'description': '', 'type': 21, 'params': {'max_length': 65535}}, - {'field_id': 103, 'name': 'json_field', 'description': '', 'type': 23, 'params': {}}, - {'field_id': 104, 'name': 'float_vector', 'description': '', 'type': 101, 'params': {'dim': 128}} + {'field_id': 100, 'name': 'int64', 'description': '', 'type': DataType.INT64, 'params': {}, + 'is_primary': True}, + {'field_id': 101, 'name': 'float', 'description': '', 'type': DataType.FLOAT, 'params': {}}, + {'field_id': 102, 'name': 'varchar', 'description': '', 'type': DataType.VARCHAR, + 'params': {'max_length': 65535}}, + {'field_id': 103, 'name': 'json_field', 'description': '', 'type': DataType.JSON, 'params': {}}, + {'field_id': 104, 'name': 'float_vector', 'description': '', 'type': DataType.FLOAT_VECTOR, + 'params': {'dim': 128}} ], 'functions': [], 'aliases': [], 'consistency_level': 0, 'properties': {}, 'num_partitions': 1, 'enable_dynamic_field': False} res = collection_w.describe()[0] + assert isinstance(res['collection_id'], int) and isinstance(res['created_timestamp'], int) del res['collection_id'] + del res['created_timestamp'] log.info(res) assert description == res diff --git a/tests/python_client/testcases/test_index.py b/tests/python_client/testcases/test_index.py index 1f6f1232a6..bf0bc97a62 100644 --- a/tests/python_client/testcases/test_index.py +++ b/tests/python_client/testcases/test_index.py @@ -2212,7 +2212,8 @@ class TestScaNNIndex(TestcaseBase): collection_w = self.init_collection_general(prefix, is_index=False, dim=dim)[0] index_params = {"index_type": "SCANN", "metric_type": "L2", "params": {"nlist": 1024}} error = {ct.err_code: 1100, - ct.err_msg: f"The dimension of a vector (dim) should be a multiple of 2. Dimension:{dim}"} + ct.err_msg: f"The dimension of a vector (dim) should be a multiple of sub_dim. " + f"Dimension:{dim}, sub_dim:2: invalid parameter"} collection_w.create_index(default_field_name, index_params, check_task=CheckTasks.err_res, check_items=error) diff --git a/tests/python_client/testcases/test_query.py b/tests/python_client/testcases/test_query.py index 7967441cef..f1c5c8d95b 100644 --- a/tests/python_client/testcases/test_query.py +++ b/tests/python_client/testcases/test_query.py @@ -1775,7 +1775,7 @@ class TestQueryParams(TestcaseBase): collection_w.insert(data) # 3. query with param ignore_growing invalid - error = {ct.err_code: 999, ct.err_msg: "parse search growing failed"} + error = {ct.err_code: 999, ct.err_msg: "parse ignore growing field failed"} collection_w.query('int64 >= 0', ignore_growing=ignore_growing, check_task=CheckTasks.err_res, check_items=error) diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index dd1119096e..3a5042c386 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -1037,13 +1037,12 @@ class TestCollectionSearchInvalid(TestcaseBase): # 3. search with param ignore_growing=True search_params = {"metric_type": "L2", "params": {"nprobe": 10}, "ignore_growing": ignore_growing} - vector = [[random.random() for _ in range(default_dim)] - for _ in range(nq)] + vector = [[random.random() for _ in range(default_dim)] for _ in range(nq)] collection_w.search(vector[:default_nq], default_search_field, search_params, default_limit, default_search_exp, check_task=CheckTasks.err_res, check_items={"err_code": 999, - "err_msg": "parse search growing failed"}) + "err_msg": "parse ignore growing field failed"}) @pytest.mark.tags(CaseLabel.L2) def test_search_param_invalid_guarantee_timestamp(self, get_invalid_guarantee_timestamp):