diff --git a/tests/python_client/requirements.txt b/tests/python_client/requirements.txt index b437198d672ce9db84629fe643c347515a456756..7f115884396f7f121e340d5694f35c687f18168d 100644 --- a/tests/python_client/requirements.txt +++ b/tests/python_client/requirements.txt @@ -12,7 +12,7 @@ allure-pytest==2.7.0 pytest-print==0.2.1 pytest-level==0.1.1 pytest-xdist==2.5.0 -pymilvus==2.4.0.dev101 +pymilvus==2.4.0.dev103 pytest-rerunfailures==9.1.1 git+https://github.com/Projectplace/pytest-tags ndg-httpsclient diff --git a/tests/python_client/testcases/test_insert.py b/tests/python_client/testcases/test_insert.py index bb2ec707435f7ae37a23b9dd98077e750ac31cd3..249569fe0c57385e3949384d9726e89de7956476 100644 --- a/tests/python_client/testcases/test_insert.py +++ b/tests/python_client/testcases/test_insert.py @@ -1187,10 +1187,11 @@ class TestInsertInvalid(TestcaseBase): schema = cf.gen_collection_schema([string_field, embedding_field], auto_id=True) collection_w = self.init_collection_wrap(schema=schema) data = [[[random.random() for _ in range(ct.default_dim)] for _ in range(2)]] - error = {ct.err_code: 1, ct.err_msg: "the length (18) of 0th string exceeds max length (6)"} - collection_w.insert(data=data, check_task=CheckTasks.err_res, check_items=error) + res = collection_w.insert(data=data)[0] + assert res.insert_count == 2 @pytest.mark.tags(CaseLabel.L2) + @pytest.mark.skip("no error code provided now") def test_insert_over_resource_limit(self): """ target: test insert over RPC limitation 64MB (67108864) diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index 5aac6ebd1f05fd738cb67742b5a0161eec006de2..268b02921092dd6d51ca0aa6e794bcce79a06858 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -1162,17 +1162,11 @@ class TestCollectionSearchInvalid(TestcaseBase): dim=dim, is_index=False)[0:5] # 2. create index default_index = {"index_type": "BIN_FLAT", "params": {"nlist": 128}, "metric_type": metric} - collection_w.create_index("binary_vector", default_index) - collection_w.load() - # 3. generate search vectors - binary_vectors = cf.gen_binary_vectors(nq, dim)[1] - # 4. search and compare the distance - search_params = {"metric_type": metric, "params": {"nprobe": 10, "radius": 10, "range_filter": 1}} - collection_w.search(binary_vectors[:nq], "binary_vector", - search_params, default_limit, - check_task=CheckTasks.err_res, - check_items={"err_code": 1, - "err_msg": f"invalid metric type"})[0] + collection_w.create_index("binary_vector", default_index, + check_task=CheckTasks.err_res, + check_items={"err_code": 1, + "err_msg": "metric type not found or not supported, " + "supported: [HAMMING JACCARD]"}) @pytest.mark.tags(CaseLabel.L1) def test_search_dynamic_compare_two_fields(self): @@ -1232,6 +1226,8 @@ class TestCollectionSearch(TestcaseBase): @pytest.fixture(scope="function", params=["JACCARD", "HAMMING", "TANIMOTO"]) def metrics(self, request): + if request.param == "TANIMOTO": + pytest.skip("TANIMOTO not supported now") yield request.param @pytest.fixture(scope="function", params=[False, True]) @@ -6007,6 +6003,8 @@ class TestCollectionRangeSearch(TestcaseBase): @pytest.fixture(scope="function", params=["JACCARD", "HAMMING", "TANIMOTO"]) def metrics(self, request): + if request.param == "TANIMOTO": + pytest.skip("TANIMOTO not supported now") yield request.param @pytest.fixture(scope="function", params=[False, True]) @@ -8364,8 +8362,9 @@ class TestCollectionLoadOperation(TestcaseBase): partition_w2.release() # search on collection collection_w.search(vectors[:1], field_name, default_search_params, 200, - check_task=CheckTasks.check_search_results, - check_items={"nq": 1, "limit": 0}) + check_task=CheckTasks.err_res, + check_items={ct.err_code: 1, + ct.err_msg: "fail to get shard leaders from QueryCoord: collection not loaded"}) @pytest.mark.tags(CaseLabel.L2) @pytest.mark.xfail(reason="issue #24446")