From 10ec3ce2bfcc7f308dbce7f2b3750d43f8e232f8 Mon Sep 17 00:00:00 2001 From: yanliang567 <82361606+yanliang567@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:30:55 +0800 Subject: [PATCH] test: Upgrade pymilvus to 2.6.0rc166 (#43543) related issue: #40698 Signed-off-by: yanliang567 --- tests/python_client/requirements.txt | 4 ++-- tests/python_client/testcases/test_connection.py | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/python_client/requirements.txt b/tests/python_client/requirements.txt index c9852f8c7c..0dfc14f9be 100644 --- a/tests/python_client/requirements.txt +++ b/tests/python_client/requirements.txt @@ -28,8 +28,8 @@ pytest-parallel pytest-random-order # pymilvus -pymilvus==2.6.0rc157 -pymilvus[bulk_writer]==2.6.0rc157 +pymilvus==2.6.0rc166 +pymilvus[bulk_writer]==2.6.0rc166 # for protobuf protobuf==5.27.2 diff --git a/tests/python_client/testcases/test_connection.py b/tests/python_client/testcases/test_connection.py index ed30df5887..cd66b9f5d0 100644 --- a/tests/python_client/testcases/test_connection.py +++ b/tests/python_client/testcases/test_connection.py @@ -444,12 +444,17 @@ class TestConnectionOperation(TestcaseBase): target: connect with non existing params method: 1. add connection with non existing params 2. try to connect + 3. connect failure will remove connection alias in list connections expected: raise an exception """ # add invalid default connection self.connection_wrap.add_connection(default={'host': "host", 'port': port}) + # list all connections and check the response + self.connection_wrap.list_connections(check_task=ct.CheckTasks.ccr, + check_items={ct.list_content: [(DefaultConfig.DEFAULT_USING, None)]}) + # using default alias to create connection, the connection does not exist err_msg = cem.FailConnect % ("host", str(port)) self.connection_wrap.connect(alias=DefaultConfig.DEFAULT_USING, check_task=ct.CheckTasks.err_res, @@ -457,13 +462,11 @@ class TestConnectionOperation(TestcaseBase): ct.err_msg: "illegal connection params or server unavailable"}) # list all connections and check the response - self.connection_wrap.list_connections(check_task=ct.CheckTasks.ccr, - check_items={ct.list_content: [(DefaultConfig.DEFAULT_USING, None)]}) + self.connection_wrap.list_connections(check_task=ct.CheckTasks.ccr, check_items={ct.list_content: []}) # get all addr of alias and check the response self.connection_wrap.get_connection_addr(alias=DefaultConfig.DEFAULT_USING, check_task=ct.CheckTasks.ccr, - check_items={ct.dict_content: {"address": f"host:{port}", - "user": ""}}) + check_items={ct.dict_content: {}}) @pytest.mark.tags(ct.CaseLabel.L0) def test_connection_connect_default_alias_effective(self, host, port): @@ -883,8 +886,8 @@ class TestConnect(TestcaseBase): """ self.connection_wrap.connect(alias=connect_name, host=host, port=port, user=ct.default_user, password=ct.default_password, check_task=ct.CheckTasks.ccr) - res = self.utility_wrap.list_collections()[0] - assert len(res) == 0 + res = self.connection_wrap.list_connections()[0] + assert len(res) == 1 class TestConnectIPInvalid(TestcaseBase):