diff --git a/tests/python_client/common/common_func.py b/tests/python_client/common/common_func.py index e70a6d76e9..61b0fa92c5 100644 --- a/tests/python_client/common/common_func.py +++ b/tests/python_client/common/common_func.py @@ -1674,12 +1674,12 @@ def index_to_dict(index): def get_index_params_params(index_type): """get default params of index params by index type""" - return ct.default_all_indexes_params[ct.all_index_types.index(index_type)] + return ct.default_all_indexes_params[ct.all_index_types.index(index_type)].copy() def get_search_params_params(index_type): """get default params of search params by index type""" - return ct.default_all_search_params_params[ct.all_index_types.index(index_type)] + return ct.default_all_search_params_params[ct.all_index_types.index(index_type)].copy() def assert_json_contains(expr, list_data): diff --git a/tests/python_client/common/common_type.py b/tests/python_client/common/common_type.py index b95e74ebe8..946aff8183 100644 --- a/tests/python_client/common/common_type.py +++ b/tests/python_client/common/common_type.py @@ -271,11 +271,11 @@ default_bin_flat_index = {"index_type": "BIN_FLAT", "params": {}, "metric_type": default_sparse_inverted_index = {"index_type": "SPARSE_INVERTED_INDEX", "metric_type": "IP", "params": {"drop_ratio_build": 0.2}} -default_search_params = {"params": default_all_search_params_params[2]} -default_search_ip_params = {"metric_type": "IP", "params": default_all_search_params_params[2]} +default_search_params = {"params": default_all_search_params_params[2].copy()} +default_search_ip_params = {"metric_type": "IP", "params": default_all_search_params_params[2].copy()} default_search_binary_params = {"metric_type": "JACCARD", "params": {"nprobe": 32}} -default_index = {"index_type": "IVF_SQ8", "metric_type": default_L0_metric, "params": default_all_indexes_params[2]} -default_binary_index = {"index_type": "BIN_IVF_FLAT", "metric_type": "JACCARD", "params": default_all_indexes_params[8]} +default_index = {"index_type": "IVF_SQ8", "metric_type": default_L0_metric, "params": default_all_indexes_params[2].copy()} +default_binary_index = {"index_type": "BIN_IVF_FLAT", "metric_type": "JACCARD", "params": default_all_indexes_params[8].copy()} default_diskann_index = {"index_type": "DISKANN", "metric_type": default_L0_metric, "params": {}} default_diskann_search_params = {"params": {"search_list": 30}} default_sparse_search_params = {"metric_type": "IP", "params": {"drop_ratio_search": "0.2"}} diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index 10ccec344a..ce3bb52a31 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -6891,7 +6891,7 @@ class TestCollectionRangeSearch(TestcaseBase): @pytest.fixture(scope="function", params=ct.all_index_types[:7]) def index_type(self, request): tags = request.config.getoption("--tags") - if CaseLabel.L2 not in tags: + if CaseLabel.L2 not in tags or "all" not in tags: if request.param not in ct.L0_index_types: pytest.skip(f"skip index type {request.param}") yield request.param @@ -6899,7 +6899,7 @@ class TestCollectionRangeSearch(TestcaseBase): @pytest.fixture(scope="function", params=ct.float_metrics) def metric(self, request): tags = request.config.getoption("--tags") - if CaseLabel.L2 not in tags: + if CaseLabel.L2 not in tags or "all" not in tags: if request.param not in ct.default_L0_metric: pytest.skip(f"skip index type {request.param}") yield request.param @@ -10989,7 +10989,7 @@ class TestCollectionHybridSearchValid(TestcaseBase): expected: hybrid search successfully with limit(topK) """ # 1. initialize collection with data - dim = 77 + dim = 128 collection_w, _, _, insert_ids, time_stamp = \ self.init_collection_general(prefix, True, dim=dim, is_flush=is_flush, is_index=False, primary_field=primary_field, @@ -11444,7 +11444,7 @@ class TestCollectionHybridSearchValid(TestcaseBase): expected: hybrid search successfully with limit(topK) """ # 1. initialize collection with data - dim = 77 + dim = 128 multiple_dim_array = [dim, dim] collection_w, _, _, insert_ids, time_stamp = \ self.init_collection_general(prefix, True, dim=dim, is_index=False, primary_field=primary_field,