diff --git a/tests/python_client/testcases/test_connection.py b/tests/python_client/testcases/test_connection.py index 74a46cad11..b04841b3c5 100644 --- a/tests/python_client/testcases/test_connection.py +++ b/tests/python_client/testcases/test_connection.py @@ -849,7 +849,8 @@ class TestConnect(TestcaseBase): uri = "{}://{}:{}".format(protocol, host, port) self.connection_wrap.connect(alias=connect_name, uri=uri, check_task=ct.CheckTasks.err_res, check_items={ct.err_code: 999, - ct.err_msg: "Open local milvus failed, dir: ftp: not exists"}) + ct.err_msg: "needs start with [unix, http, https, tcp] " + "or a local file endswith [.db]"}) @pytest.mark.tags(ct.CaseLabel.L2) @pytest.mark.parametrize("connect_name", [DefaultConfig.DEFAULT_USING]) diff --git a/tests/python_client/testcases/test_index.py b/tests/python_client/testcases/test_index.py index 9447704d14..4a0f809580 100644 --- a/tests/python_client/testcases/test_index.py +++ b/tests/python_client/testcases/test_index.py @@ -246,11 +246,8 @@ class TestIndexOperation(TestcaseBase): """ schema = cf.gen_array_collection_schema() collection_w = self.init_collection_wrap(schema=schema) - error = {ct.err_code: 1100, - ct.err_msg: "create index on json field is not supported: expected=supported field, " - "actual=create index on Array field: invalid parameter"} - collection_w.create_index(ct.default_string_array_field_name, {}, - check_task=CheckTasks.err_res, check_items=error) + collection_w.create_index(ct.default_string_array_field_name, {}) + assert collection_w.index()[0].params == {} @pytest.mark.tags(CaseLabel.L1) def test_index_collection_empty(self): @@ -1399,8 +1396,8 @@ class TestIndexInvalid(TestcaseBase): expected: raise exception """ collection_w = self.init_collection_general(prefix, is_index=False, is_all_data_type=True)[0] - scalar_index = ["Trie", "STL_SORT", "INVERTED"] - scalar_fields = [ct.default_string_field_name, ct.default_int16_field_name, ct.default_int32_field_name] + scalar_index = ["Trie", "STL_SORT"] + scalar_fields = [ct.default_string_field_name, ct.default_int16_field_name] for i in range(len(scalar_fields)): index_name = f"scalar_index_name_{i}" scalar_index_params = {"index_type": f"{scalar_index[i]}"} diff --git a/tests/python_client/testcases/test_insert.py b/tests/python_client/testcases/test_insert.py index ea44b0664b..ef1a4f7061 100644 --- a/tests/python_client/testcases/test_insert.py +++ b/tests/python_client/testcases/test_insert.py @@ -390,7 +390,8 @@ class TestInsertParams(TestcaseBase): data = cf.gen_default_list_data(nb=100) data[0][1] = 1.0 error = {ct.err_code: 999, - ct.err_msg: "The Input data type is inconsistent with defined schema, please check it."} + ct.err_msg: "The Input data type is inconsistent with defined schema, {%s} field should be a int64, " + "but got a {} instead." % ct.default_int64_field_name} collection_w.insert(data, check_task=CheckTasks.err_res, check_items=error) @@ -2091,7 +2092,7 @@ class TestUpsertInvalid(TestcaseBase): check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) - @pytest.mark.xfail("insert and upsert have removed the [] error check") + @pytest.mark.skip("insert and upsert have removed the [] error check") def test_upsert_multi_partitions(self): """ target: test upsert two partitions @@ -2106,7 +2107,7 @@ class TestUpsertInvalid(TestcaseBase): cf.insert_data(collection_w) data = cf.gen_default_dataframe_data(nb=1000) error = {ct.err_code: 999, ct.err_msg: "['partition_1', 'partition_2'] has type , " - "but expected one of: (, )"} + "but expected one of: (, )"} collection_w.upsert(data=data, partition_name=["partition_1", "partition_2"], check_task=CheckTasks.err_res, check_items=error) diff --git a/tests/python_client/testcases/test_partition.py b/tests/python_client/testcases/test_partition.py index 7c25e74388..cf2cb19e73 100644 --- a/tests/python_client/testcases/test_partition.py +++ b/tests/python_client/testcases/test_partition.py @@ -369,7 +369,8 @@ class TestPartitionParams(TestcaseBase): # load with 2 replicas error = {ct.err_code: 65535, - ct.err_msg: "failed to load partitions: failed to spawn replica for collection: nodes not enough"} + ct.err_msg: "failed to spawn replica for collection: resource group node not enough" + "[rg=__default_resource_group]"} collection_w.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index) partition_w.load(replica_number=3, check_task=CheckTasks.err_res, check_items=error) @@ -396,8 +397,8 @@ class TestPartitionParams(TestcaseBase): partition_w.load(replica_number=1) collection_w.query(expr=f"{ct.default_int64_field_name} in [0]", check_task=CheckTasks.check_query_results, check_items={'exp_res': [{'int64': 0}]}) - error = {ct.err_code: 1100, ct.err_msg: "failed to load partitions: can't change the replica number for " - "loaded partitions: expected=1, actual=2: invalid parameter"} + error = {ct.err_code: 1100, ct.err_msg: "call query coordinator LoadCollection: can't change the replica number" + " for loaded collection: invalid parameter[expected=1][actual=2]"} partition_w.load(replica_number=2, check_task=CheckTasks.err_res, check_items=error) partition_w.release()