From 6de80a0c1923a93429837248c5f76bdc5cf96365 Mon Sep 17 00:00:00 2001 From: zhuwenxing Date: Fri, 31 May 2024 13:54:07 +0800 Subject: [PATCH] test: add different nq for restful v2 test (#33469) pr: https://github.com/milvus-io/milvus/pull/33456 Signed-off-by: zhuwenxing --- .../restful_client_v2/testcases/test_vector_operations.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/restful_client_v2/testcases/test_vector_operations.py b/tests/restful_client_v2/testcases/test_vector_operations.py index 10374102b6a9d..b5a59847d34fd 100644 --- a/tests/restful_client_v2/testcases/test_vector_operations.py +++ b/tests/restful_client_v2/testcases/test_vector_operations.py @@ -750,8 +750,9 @@ def test_search_vector_with_all_vector_datatype(self, nb, dim, insert_round, aut @pytest.mark.parametrize("enable_dynamic_schema", [True]) @pytest.mark.parametrize("nb", [3000]) @pytest.mark.parametrize("dim", [128]) + @pytest.mark.parametrize("nq", [1, 2]) def test_search_vector_with_float_vector_datatype(self, nb, dim, insert_round, auto_id, - is_partition_key, enable_dynamic_schema): + is_partition_key, enable_dynamic_schema, nq): """ Insert a vector with a simple payload """ @@ -812,7 +813,7 @@ def test_search_vector_with_float_vector_datatype(self, nb, dim, insert_round, a # search data payload = { "collectionName": name, - "data": [gen_vector(datatype="FloatVector", dim=dim)], + "data": [gen_vector(datatype="FloatVector", dim=dim) for _ in range(nq)], "filter": "word_count > 100", "groupingField": "user_id", "outputFields": ["*"], @@ -827,7 +828,7 @@ def test_search_vector_with_float_vector_datatype(self, nb, dim, insert_round, a } rsp = self.vector_client.vector_search(payload) assert rsp['code'] == 0 - assert len(rsp['data']) == 100 + assert len(rsp['data']) == 100 * nq @pytest.mark.parametrize("insert_round", [1])