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 1f981fb57fe32..43d71de2c8e4c 100644 --- a/tests/python_client/milvus_client/test_milvus_client_collection.py +++ b/tests/python_client/milvus_client/test_milvus_client_collection.py @@ -235,7 +235,6 @@ def id_type(self, request): """ @pytest.mark.tags(CaseLabel.L0) - @pytest.mark.xfail(reason="pymilvus issue 1871") @pytest.mark.parametrize("dim", [ct.min_dim, default_dim, ct.max_dim]) def test_milvus_client_collection_fast_creation_default(self, dim): """ @@ -1131,47 +1130,27 @@ class TestMilvusClientUsingDatabaseInvalid(TestcaseBase): # The following are invalid base cases ****************************************************************** """ - - @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="pymilvus issue 1900") - @pytest.mark.parametrize("name", ["12-s", "12 s", "(mn)", "中文", "%$#"]) - def test_milvus_client_using_database_invalid_db_name(self, name): - """ - target: test fast create collection normal case - method: create collection - expected: create collection with default schema, index, and load successfully - """ - client = self._connect(enable_milvus_client_api=True) - error = {ct.err_code: 800, ct.err_msg: f"Invalid collection name: {name}. collection name can only " - f"contain numbers, letters and underscores: invalid parameter"} - client_w.using_database(client, name, - check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L2) - def test_milvus_client_using_database_not_exist_db_name(self): + @pytest.mark.xfail(reason="pymilvus issue 1900") + @pytest.mark.parametrize("db_name", ["12-s", "12 s", "(mn)", "中文", "%$#"]) + def test_milvus_client_using_database_not_exist_db_name(self, db_name): """ target: test fast create collection normal case method: create collection expected: drop successfully """ client = self._connect(enable_milvus_client_api=True) - db_name = cf.gen_unique_str("nonexisted") - error = {ct.err_code: 800, ct.err_msg: f"database not found[database=non-default]"} + # db_name = cf.gen_unique_str("nonexisted") + error = {ct.err_code: 999, ct.err_msg: f"database not found[database={db_name}]"} client_w.using_database(client, db_name, - check_task=CheckTasks.err_res, check_items=error)[0] + check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) - @pytest.mark.xfail(reason="pymilvus issue 1900") + @pytest.mark.skip(reason="# this case is dup to using a non exist db name, try to add one for create database") def test_milvus_client_using_database_db_name_over_max_length(self): """ target: test fast create collection normal case method: create collection expected: drop successfully """ - client = self._connect(enable_milvus_client_api=True) - db_name = "a".join("a" for i in range(256)) - error = {ct.err_code: 1100, ct.err_msg: f"invalid dimension: {db_name}. " - f"the length of a collection name must be less than 255 characters: " - f"invalid parameter"} - client_w.using_database(client, db_name, - check_task=CheckTasks.err_res, check_items=error)[0] \ No newline at end of file + pass diff --git a/tests/python_client/milvus_client/test_milvus_client_delete.py b/tests/python_client/milvus_client/test_milvus_client_delete.py index 489e69749c849..e4139949a84dd 100644 --- a/tests/python_client/milvus_client/test_milvus_client_delete.py +++ b/tests/python_client/milvus_client/test_milvus_client_delete.py @@ -106,8 +106,7 @@ def test_milvus_client_delete_with_invalid_id_type(self): check_items={"err_code": 1, "err_msg": "expr cannot be empty"}) - @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="pymilvus issue 1870") + @pytest.mark.tags(CaseLabel.L2) def test_milvus_client_delete_with_not_all_required_params(self): """ target: test delete (high level api) @@ -121,8 +120,8 @@ def test_milvus_client_delete_with_not_all_required_params(self): # 2. delete client_w.delete(client, collection_name, check_task=CheckTasks.err_res, - check_items={"err_code": 1, - "err_msg": "expr cannot be empty"}) + check_items={"err_code": 999, + "err_msg": "filter or ids cannot be empty"}) class TestMilvusClientDeleteValid(TestcaseBase): diff --git a/tests/python_client/milvus_client/test_milvus_client_insert.py b/tests/python_client/milvus_client/test_milvus_client_insert.py index 450b9009a8909..867a89eb64772 100644 --- a/tests/python_client/milvus_client/test_milvus_client_insert.py +++ b/tests/python_client/milvus_client/test_milvus_client_insert.py @@ -151,9 +151,8 @@ def test_milvus_client_insert_not_exist_collection_name(self): client_w.insert(client, collection_name, rows, check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="pymilvus issue 1894") - @pytest.mark.parametrize("data", ["12-s", "12 s", "(mn)", "中文", "%$#", " "]) + @pytest.mark.tags(CaseLabel.L2) + @pytest.mark.parametrize("data", ["12-s", "12 s", "(mn)", "中文", "%$#", " ", ""]) def test_milvus_client_insert_data_invalid_type(self, data): """ target: test high level api: client.create_collection @@ -165,26 +164,11 @@ def test_milvus_client_insert_data_invalid_type(self, data): # 1. create collection client_w.create_collection(client, collection_name, default_dim, consistency_level="Strong") # 2. insert - error = {ct.err_code: 1, ct.err_msg: f"None rows, please provide valid row data."} + error = {ct.err_code: 999, + ct.err_msg: "wrong type of argument 'data',expected 'Dict' or list of 'Dict', got 'str'"} client_w.insert(client, collection_name, data, check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="pymilvus issue 1895") - def test_milvus_client_insert_data_empty(self): - """ - target: test high level api: client.create_collection - method: create collection with invalid primary field - expected: Raise exception - """ - client = self._connect(enable_milvus_client_api=True) - collection_name = cf.gen_unique_str(prefix) - # 1. create collection - client_w.create_collection(client, collection_name, default_dim, consistency_level="Strong") - # 2. insert - error = {ct.err_code: 1, ct.err_msg: f"None rows, please provide valid row data."} - client_w.insert(client, collection_name, data= "") - @pytest.mark.tags(CaseLabel.L1) def test_milvus_client_insert_data_vector_field_missing(self): """ diff --git a/tests/python_client/milvus_client/test_milvus_client_partition.py b/tests/python_client/milvus_client/test_milvus_client_partition.py index 152d5aa0377eb..0ab2359215059 100644 --- a/tests/python_client/milvus_client/test_milvus_client_partition.py +++ b/tests/python_client/milvus_client/test_milvus_client_partition.py @@ -142,7 +142,7 @@ def test_milvus_client_partition_name_lists(self): partition_names = [cf.gen_unique_str(partition_prefix), cf.gen_unique_str(partition_prefix)] # 2. create partition client_w.create_collection(client, collection_name, default_dim) - error = {ct.err_code: 1, ct.err_msg: f"`partition_name` value {partition_names} is illegal"} + error = {ct.err_code: 999, ct.err_msg: f"`partition_name` value {partition_names} is illegal"} client_w.create_partition(client, collection_name, partition_names, check_task=CheckTasks.err_res, check_items=error) @@ -316,7 +316,7 @@ def test_milvus_client_has_partition_collection_partition_not_match(self): client_w.create_partition(client, collection_name, partition_name) client_w.create_collection(client, another_collection_name, default_dim) result = client_w.has_partition(client, another_collection_name, partition_name)[0] - assert result == False + assert result is False class TestMilvusClientDropPartitionInvalid(TestcaseBase): @@ -382,7 +382,7 @@ def test_milvus_client_drop_partition_not_exist_collection_name(self): error = {ct.err_code: 100, ct.err_msg: f"collection not found[database=default]" f"[collection={collection_name}]"} client_w.drop_partition(client, collection_name, partition_name, - check_task=CheckTasks.err_res, check_items=error) + check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L1) @pytest.mark.parametrize("partition_name", ["12-s", "12 s", "(mn)", "中文", "%$#"]) @@ -435,7 +435,7 @@ def metric_type(self, request): ****************************************************************** """ - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) @pytest.mark.parametrize("collection_name", ["12-s", "12 s", "(mn)", "中文", "%$#"]) def test_milvus_client_release_partition_invalid_collection_name(self, collection_name): """ @@ -446,12 +446,12 @@ def test_milvus_client_release_partition_invalid_collection_name(self, collectio client = self._connect(enable_milvus_client_api=True) partition_name = cf.gen_unique_str(partition_prefix) # 2. create partition - error = {ct.err_code: 1100, ct.err_msg: f"Invalid collection name: {collection_name}. the first character of a " + error = {ct.err_code: 999, ct.err_msg: f"Invalid collection name: {collection_name}. the first character of a " f"collection name must be an underscore or letter: invalid parameter"} client_w.release_partitions(client, collection_name, partition_name, check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_milvus_client_release_partition_collection_name_over_max_length(self): """ target: test fast create collection normal case @@ -462,12 +462,12 @@ def test_milvus_client_release_partition_collection_name_over_max_length(self): collection_name = "a".join("a" for i in range(256)) partition_name = cf.gen_unique_str(partition_prefix) # 2. create partition - error = {ct.err_code: 1100, ct.err_msg: f"Invalid collection name: {collection_name}. the length of a collection name " + error = {ct.err_code: 999, ct.err_msg: f"Invalid collection name: {collection_name}. the length of a collection name " f"must be less than 255 characters: invalid parameter"} client_w.release_partitions(client, collection_name, partition_name, check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_milvus_client_release_partition_not_exist_collection_name(self): """ target: test release partition -- not exist collection name @@ -478,7 +478,7 @@ def test_milvus_client_release_partition_not_exist_collection_name(self): collection_name = cf.gen_unique_str("partition_not_exist") partition_name = cf.gen_unique_str(partition_prefix) # 2. create partition - error = {ct.err_code: 100, ct.err_msg: f"collection not found[database=default]" + error = {ct.err_code: 999, ct.err_msg: f"collection not found[database=default]" f"[collection={collection_name}]"} client_w.release_partitions(client, collection_name, partition_name, check_task=CheckTasks.err_res, check_items=error) @@ -499,7 +499,7 @@ def test_milvus_client_release_partition_invalid_partition_name(self, partition_ error = {ct.err_code: 65535, ct.err_msg: f"Invalid partition name: {partition_name}. The first character of a " f"partition name must be an underscore or letter.]"} client_w.release_partitions(client, collection_name, partition_name, - check_task=CheckTasks.err_res, check_items=error) + check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L1) @pytest.mark.xfail(reason="pymilvus issue 1896") @@ -517,10 +517,9 @@ def test_milvus_client_release_partition_invalid_partition_name_list(self): error = {ct.err_code: 65535, ct.err_msg: f"Invalid partition name: {partition_name}. The first character of a " f"partition name must be an underscore or letter.]"} client_w.release_partitions(client, collection_name, partition_name, - check_task=CheckTasks.err_res, check_items=error) + check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="pymilvus issue 1897") + @pytest.mark.tags(CaseLabel.L2) def test_milvus_client_release_partition_name_lists_empty(self): """ target: test fast release partition -- invalid partition name type @@ -529,15 +528,14 @@ def test_milvus_client_release_partition_name_lists_empty(self): """ client = self._connect(enable_milvus_client_api=True) collection_name = cf.gen_unique_str(prefix) - not_exist_partition = cf.gen_unique_str("partition_not_exist") partition_names = [] # 2. create partition client_w.create_collection(client, collection_name, default_dim) - error = {ct.err_code: 1100, ct.err_msg: f"invalid parameter[expected=any partition][actual=empty partition list"} + error = {ct.err_code: 999, ct.err_msg: f"invalid parameter[expected=any partition][actual=empty partition list"} client_w.release_partitions(client, collection_name, partition_names, - check_task=CheckTasks.err_res, check_items=error) + check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_milvus_client_release_partition_name_lists_not_all_exists(self): """ target: test fast release partition -- invalid partition name type @@ -550,11 +548,11 @@ def test_milvus_client_release_partition_name_lists_not_all_exists(self): partition_names = ["_default", not_exist_partition] # 2. create partition client_w.create_collection(client, collection_name, default_dim) - error = {ct.err_code: 1, ct.err_msg: f"partition not found[partition={not_exist_partition}]"} + error = {ct.err_code: 999, ct.err_msg: f"partition not found[partition={not_exist_partition}]"} client_w.release_partitions(client, collection_name, partition_names, - check_task=CheckTasks.err_res, check_items=error) + check_task=CheckTasks.err_res, check_items=error) - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_milvus_client_release_not_exist_partition_name(self): """ target: test fast release partition -- invalid partition name type diff --git a/tests/python_client/testcases/test_alias.py b/tests/python_client/testcases/test_alias.py index b5feceefa6e4c..67f29cf0036e3 100644 --- a/tests/python_client/testcases/test_alias.py +++ b/tests/python_client/testcases/test_alias.py @@ -309,9 +309,6 @@ def test_alias_create_duplication_alias(self): self.utility_wrap.create_alias(collection_2.name, alias_a_name, check_task=CheckTasks.err_res, check_items=error) - # collection_2.create_alias(alias_a_name, - # check_task=CheckTasks.err_res, - # check_items=error) @pytest.mark.tags(CaseLabel.L1) def test_alias_alter_not_exist_alias(self): @@ -330,7 +327,6 @@ def test_alias_alter_not_exist_alias(self): check_items={exp_name: c_name, exp_schema: default_schema}) alias_name = cf.gen_unique_str(prefix) self.utility_wrap.create_alias(collection_w.name, alias_name) - # collection_w.create_alias(alias_name) alias_not_exist_name = cf.gen_unique_str(prefix) error = {ct.err_code: 1600, @@ -338,9 +334,6 @@ def test_alias_alter_not_exist_alias(self): self.utility_wrap.alter_alias(collection_w.name, alias_not_exist_name, check_task=CheckTasks.err_res, check_items=error) - # collection_w.alter_alias(alias_not_exist_name, - # check_task=CheckTasks.err_res, - # check_items=error) @pytest.mark.tags(CaseLabel.L2) def test_alias_drop_not_exist_alias(self): @@ -349,7 +342,7 @@ def test_alias_drop_not_exist_alias(self): method: 1.create a collection with alias 2.collection drop alias which is not exist - expected: drop alias failed + expected: drop alias succ """ self._connect() c_name = cf.gen_unique_str("collection") @@ -358,23 +351,10 @@ def test_alias_drop_not_exist_alias(self): check_items={exp_name: c_name, exp_schema: default_schema}) alias_name = cf.gen_unique_str(prefix) self.utility_wrap.create_alias(collection_w.name, alias_name) - # collection_w.create_alias(alias_name) - alias_not_exist_name = cf.gen_unique_str(prefix) - error = {ct.err_code: 1, - ct.err_msg: "Drop alias failed: alias does not exist"} - # self.utility_wrap.drop_alias(alias_not_exist_name, - # check_task=CheckTasks.err_res, - # check_items=error) - # @longjiquan: dropping alias should be idempotent. self.utility_wrap.drop_alias(alias_not_exist_name) - # - # collection_w.drop_alias(alias_not_exist_name, - # check_task=CheckTasks.err_res, - # check_items=error) - - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_alias_drop_same_alias_twice(self): """ target: test collection dropping same alias twice @@ -382,7 +362,7 @@ def test_alias_drop_same_alias_twice(self): 1.create a collection with alias 2.collection drop alias 3.collection drop alias again - expected: drop alias failed + expected: drop alias succ """ self._connect() c_name = cf.gen_unique_str("collection") @@ -392,21 +372,9 @@ def test_alias_drop_same_alias_twice(self): alias_name = cf.gen_unique_str(prefix) self.utility_wrap.create_alias(collection_w.name, alias_name) self.utility_wrap.drop_alias(alias_name) - # collection_w.create_alias(alias_name) - # collection_w.drop_alias(alias_name) - # @longjiquan: dropping alias should be idempotent. self.utility_wrap.drop_alias(alias_name) - # error = {ct.err_code: 1, ct.err_msg: "Drop alias failed: alias does not exist"} - # self.utility_wrap.drop_alias(alias_name, - # check_task=CheckTasks.err_res, - # check_items=error) - - # collection_w.drop_alias(alias_name, - # check_task=CheckTasks.err_res, - # check_items=error) - @pytest.mark.tags(CaseLabel.L2) def test_alias_create_dup_name_collection(self): """ @@ -442,16 +410,84 @@ def test_alias_drop_collection_by_alias(self): """ self._connect() c_name = cf.gen_unique_str("collection") + schema = cf.gen_default_collection_schema(description="this is for alias decsription") + collection_w = self.init_collection_wrap(name=c_name, schema=schema, + check_task=CheckTasks.check_collection_property, + check_items={exp_name: c_name, exp_schema: schema}) + alias_name = cf.gen_unique_str(prefix) + self.utility_wrap.create_alias(collection_w.name, alias_name) + # collection_w.create_alias(alias_name) + collection_alias = self.init_collection_wrap(name=alias_name, schema=schema, + check_task=CheckTasks.check_collection_property, + check_items={exp_name: alias_name, + exp_schema: schema}) + + error = {ct.err_code: 999, + ct.err_msg: f"cannot drop the collection via alias = {alias_name}"} + collection_alias.drop(check_task=CheckTasks.err_res, check_items=error) + + @pytest.mark.tags(CaseLabel.L0) + @pytest.mark.xfail(reason="issue #36963") + def test_alias_reuse_alias_name_from_dropped_collection(self): + """ + target: test dropping a collection which has a alias + method: + 1.create a collection + 2.create an alias for the collection + 3.drop the collection + 4.create a new collection + 5.create an alias with the same alias name for the new collection + expected: in step 5, create alias with the same name for the new collection succ + """ + self._connect() + c_name = cf.gen_unique_str("collection") collection_w = self.init_collection_wrap(name=c_name, schema=default_schema, check_task=CheckTasks.check_collection_property, check_items={exp_name: c_name, exp_schema: default_schema}) alias_name = cf.gen_unique_str(prefix) self.utility_wrap.create_alias(collection_w.name, alias_name) - # collection_w.create_alias(alias_name) - collection_alias, _ = self.collection_wrap.init_collection(name=alias_name, - check_task=CheckTasks.check_collection_property, - check_items={exp_name: alias_name, - exp_schema: default_schema}) + res = self.utility_wrap.list_aliases(c_name)[0] + assert len(res) == 1 - with pytest.raises(Exception): - collection_alias.drop() + # dropping collection that has an alias shall drop the alias as well + collection_w.drop() + collection_w = self.init_collection_wrap(name=c_name, schema=default_schema, + check_task=CheckTasks.check_collection_property, + check_items={exp_name: c_name, exp_schema: default_schema}) + res2 = self.utility_wrap.list_aliases(c_name)[0] + assert len(res2) == 0 + # the same alias name can be reused for another collection + self.utility_wrap.create_alias(c_name, alias_name) + res2 = self.utility_wrap.list_aliases(c_name)[0] + assert len(res2) == 1 + + @pytest.mark.tags(CaseLabel.L0) + @pytest.mark.xfail(reason="issue #36963") + def test_alias_rename_collection_to_alias_name(self): + """ + target: test renaming a collection to a alias name + method: + 1.create a collection + 2.create an alias for the collection + 3.rename the collection to the alias name + """ + self._connect() + c_name = cf.gen_unique_str("collection") + collection_w = self.init_collection_wrap(name=c_name, schema=default_schema, + check_task=CheckTasks.check_collection_property, + check_items={exp_name: c_name, exp_schema: default_schema}) + alias_name = cf.gen_unique_str(prefix) + self.utility_wrap.create_alias(collection_w.name, alias_name) + error = {ct.err_code: 999, + ct.err_msg: f"duplicated new collection name default:{alias_name} with other collection name or alias"} + self.utility_wrap.rename_collection(collection_w.name, alias_name, + check_task=CheckTasks.err_res, check_items=error) + + collection_w.drop() + collection_w = self.init_collection_wrap(name=c_name, schema=default_schema, + check_task=CheckTasks.check_collection_property, + check_items={exp_name: c_name, exp_schema: default_schema}) + error = {ct.err_code: 999, + ct.err_msg: f"this is not expected, any collection name or alias name shall be unique"} + self.utility_wrap.rename_collection(collection_w.name, alias_name, + check_task=CheckTasks.err_res, check_items=error) diff --git a/tests/python_client/testcases/test_collection.py b/tests/python_client/testcases/test_collection.py index a737210eed1b7..9ec871253b218 100644 --- a/tests/python_client/testcases/test_collection.py +++ b/tests/python_client/testcases/test_collection.py @@ -4392,7 +4392,6 @@ def test_create_collection_multiple_vectors_invalid_all_vector_field_name(self, self.collection_wrap.init_collection(c_name, schema=schema, check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.skip(reason="issue #29796") def test_create_collection_multiple_vectors_invalid_dim(self, get_invalid_dim): """ target: test create collection with multiple vector fields @@ -4410,7 +4409,7 @@ def test_create_collection_multiple_vectors_invalid_dim(self, get_invalid_dim): # add other vector fields to maximum fields num int_fields.append(cf.gen_int64_field(is_primary=True)) schema = cf.gen_collection_schema(fields=int_fields) - error = {ct.err_code: 65535, ct.err_msg: "Invalid dim"} + error = {ct.err_code: 65535, ct.err_msg: "invalid dimension"} self.collection_wrap.init_collection(c_name, schema=schema, check_task=CheckTasks.err_res, check_items=error) diff --git a/tests/python_client/testcases/test_compaction.py b/tests/python_client/testcases/test_compaction.py index 99eee6fff0f24..72be19fc1ab8c 100644 --- a/tests/python_client/testcases/test_compaction.py +++ b/tests/python_client/testcases/test_compaction.py @@ -35,6 +35,8 @@ def test_compact_without_connection(self): collection_w.compact(check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.skip("DataCoord: for A, B -> C, will not compact segment C before A, " + "B GCed, no method to check whether a segment is GCed") def test_compact_twice(self): """ target: test compact twice diff --git a/tests/python_client/testcases/test_field_partial_load.py b/tests/python_client/testcases/test_field_partial_load.py index 49a1356607db0..43ab9d3e5d38f 100644 --- a/tests/python_client/testcases/test_field_partial_load.py +++ b/tests/python_client/testcases/test_field_partial_load.py @@ -171,7 +171,6 @@ def test_skip_load_some_vector_fields(self): check_items={"nq": nq, "limit": 100}) @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="fail to load 2 partition with same load_fields #36037 ") def test_partial_load_with_partition(self): """ target: test partial load with partitions @@ -235,9 +234,10 @@ def test_partial_load_with_partition(self): # load the collection with all fields collection_w.load(check_task=CheckTasks.err_res, check_items=error) - collection_w.search(data=search_vectors, anns_field=vector_field.name, params=search_params, + collection_w.search(data=search_vectors, anns_field=vector_field.name, param=search_params, limit=100, output_fields=["*"], - check_task=CheckTasks.err_res, check_items=error) + check_task=CheckTasks.check_search_results, + check_items={"nq": nq, "limit": 100}) @pytest.mark.tags(CaseLabel.L2) def test_skip_load_on_all_scalar_field_types(self): diff --git a/tests/python_client/testcases/test_mix_scenes.py b/tests/python_client/testcases/test_mix_scenes.py index 989d53a582d78..841cde4f512cc 100644 --- a/tests/python_client/testcases/test_mix_scenes.py +++ b/tests/python_client/testcases/test_mix_scenes.py @@ -2239,7 +2239,6 @@ def test_search_group_size(self, group_by_field): assert len(set(group_values)) == limit @pytest.mark.tags(CaseLabel.L0) - @pytest.mark.xfail() def test_hybrid_search_group_size(self): """ hybrid search group by on 4 different float vector fields with group by varchar field with group size diff --git a/tests/python_client/testcases/test_partition_key.py b/tests/python_client/testcases/test_partition_key.py index f858cac8979e3..b16cc16755c57 100644 --- a/tests/python_client/testcases/test_partition_key.py +++ b/tests/python_client/testcases/test_partition_key.py @@ -123,7 +123,7 @@ def test_partition_key_on_collection_schema(self, par_key_field, index_on_par_ke check_task=CheckTasks.check_search_results, check_items={"nq": nq, "limit": entities_per_parkey})[0] - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_partition_key_off_in_field_but_enable_in_schema(self): """ Method: @@ -143,20 +143,9 @@ def test_partition_key_off_in_field_but_enable_in_schema(self): collection_w = self.init_collection_wrap(name=c_name, schema=schema, num_partitions=10) assert len(collection_w.partitions) == 10 - @pytest.mark.skip("need more investigation") - @pytest.mark.tags(CaseLabel.L1) - def test_partition_key_bulk_insert(self): - """ - Method: - 1. create a collection with partition key on - 2. bulk insert data - 3. verify the data bulk inserted and be searched successfully - """ - pass - class TestPartitionKeyInvalidParams(TestcaseBase): - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_max_partitions(self): """ Method: @@ -260,7 +249,7 @@ def test_invalid_partition_key_values(self, is_par_key): check_task=CheckTasks.err_res, check_items={"err_code": 2, "err_msg": err_msg}) - @pytest.mark.tags(CaseLabel.L0) + @pytest.mark.tags(CaseLabel.L2) @pytest.mark.parametrize("num_partitions", [True, False, "", "invalid", 0.1, [], {}, ()]) def test_invalid_partitions_values(self, num_partitions): """ @@ -360,7 +349,7 @@ def test_partition_key_on_primary_key(self, is_int64_primary): check_task=CheckTasks.err_res, check_items={"err_code": 2, "err_msg": err_msg}) - @pytest.mark.tags(CaseLabel.L0) + @pytest.mark.tags(CaseLabel.L1) def test_partition_key_on_and_off(self): """ Method: @@ -389,7 +378,7 @@ def test_partition_key_on_and_off(self): check_task=CheckTasks.err_res, check_items={"err_code": 2, "err_msg": err_msg}) - @pytest.mark.tags(CaseLabel.L0) + @pytest.mark.tags(CaseLabel.L2) @pytest.mark.parametrize("field_type", [DataType.FLOAT_VECTOR, DataType.BINARY_VECTOR, DataType.FLOAT, DataType.DOUBLE, DataType.BOOL, DataType.INT8, DataType.INT16, DataType.INT32, DataType.JSON]) @@ -422,7 +411,7 @@ def test_partition_key_on_invalid_type_fields(self, field_type): check_task=CheckTasks.err_res, check_items={"err_code": 2, "err_msg": err_msg}) - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) def test_partition_key_on_not_existed_fields(self): """ Method: @@ -466,7 +455,7 @@ def test_partition_key_on_empty_and_num_partitions_set(self): check_task=CheckTasks.err_res, check_items={"err_code": 2, "err_msg": err_msg}) - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L2) @pytest.mark.parametrize("invalid_data", [99, True, None, [], {}, ()]) def test_partition_key_insert_invalid_data(self, invalid_data): """ diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index 9332828960b53..2890c02b6da0a 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -1396,7 +1396,7 @@ def test_search_normal_without_specify_metric_type(self): "ids": insert_ids, "limit": default_limit}) - @pytest.mark.tags(CaseLabel.L0) + @pytest.mark.tags(CaseLabel.L1) def test_search_normal_without_specify_anns_field(self): """ target: test search normal case @@ -10069,7 +10069,7 @@ def test_search_expr_array_contains_invalid(self, expr_prefix): class TestSearchIterator(TestcaseBase): """ Test case of search iterator """ - @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.tags(CaseLabel.L0) @pytest.mark.parametrize("vector_data_type", ["FLOAT_VECTOR", "FLOAT16_VECTOR", "BFLOAT16_VECTOR"]) def test_search_iterator_normal(self, vector_data_type): """ diff --git a/tests/python_client/testcases/test_utility.py b/tests/python_client/testcases/test_utility.py index b62a904a9a260..c6c799a150ba4 100644 --- a/tests/python_client/testcases/test_utility.py +++ b/tests/python_client/testcases/test_utility.py @@ -910,7 +910,6 @@ def test_loading_progress_empty_collection(self): assert exp_res == res @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.xfail(reason="issue 19754") def test_loading_progress_after_release(self): """ target: test loading progress after release @@ -919,10 +918,9 @@ def test_loading_progress_after_release(self): """ collection_w = self.init_collection_general(prefix, insert_data=True, nb=100)[0] collection_w.release() - res = self.utility_wrap.loading_progress(collection_w.name)[0] - exp_res = {loading_progress: '0%', num_loaded_partitions: 0, not_loaded_partitions: ['_default']} - - assert exp_res == res + error = {ct.err_code: 999, ct.err_msg: "collection not loaded"} + self.utility_wrap.loading_progress(collection_w.name, + check_task=CheckTasks.err_res, check_items=error) @pytest.mark.tags(CaseLabel.L2) def test_loading_progress_with_release_partition(self):