test: Increase PyMilvus version to 2.7.0rc72 for master branch and fix async teardown logic (#45809)

Signed-off-by: silas.jiang <silas.jiang@zilliz.com>
Co-authored-by: silas.jiang <silas.jiang@zilliz.com>
This commit is contained in:
jac 2025-11-25 11:01:07 +08:00 committed by GitHub
parent 256e073e8d
commit 97da6bd7e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 23 deletions

View File

@ -28,8 +28,8 @@ pytest-parallel
pytest-random-order pytest-random-order
# pymilvus # pymilvus
pymilvus==2.7.0rc60 pymilvus==2.7.0rc72
pymilvus[bulk_writer]==2.7.0rc60 pymilvus[bulk_writer]==2.7.0rc72
# for protobuf # for protobuf
protobuf>=5.29.5 protobuf>=5.29.5

View File

@ -31,9 +31,8 @@ class TestAsyncMilvusClientCollectionInvalid(TestMilvusClientV2Base):
""" Test case of collection interface """ """ Test case of collection interface """
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
""" """
@ -128,9 +127,8 @@ class TestAsyncMilvusClientCollectionValid(TestMilvusClientV2Base):
""" Test case of collection interface """ """ Test case of collection interface """
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
""" """

View File

@ -21,9 +21,8 @@ default_vector_name = "vector"
class TestAsyncMilvusClient(TestMilvusClientV2Base): class TestAsyncMilvusClient(TestMilvusClientV2Base):
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
@pytest.mark.tags(CaseLabel.L0) @pytest.mark.tags(CaseLabel.L0)

View File

@ -30,9 +30,8 @@ class TestAsyncMilvusClientIndexInvalid(TestMilvusClientV2Base):
""" Test case of index interface """ """ Test case of index interface """
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
""" """
@ -206,9 +205,8 @@ class TestAsyncMilvusClientIndexValid(TestMilvusClientV2Base):
""" Test case of index interface """ """ Test case of index interface """
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
@pytest.fixture(scope="function", params=["COSINE", "L2", "IP"]) @pytest.fixture(scope="function", params=["COSINE", "L2", "IP"])

View File

@ -31,9 +31,8 @@ class TestAsyncMilvusClientPartitionInvalid(TestMilvusClientV2Base):
""" Test case of partition interface """ """ Test case of partition interface """
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
""" """
@ -582,9 +581,8 @@ class TestAsyncMilvusClientPartitionValid(TestMilvusClientV2Base):
""" Test case of partition interface """ """ Test case of partition interface """
def teardown_method(self, method): def teardown_method(self, method):
self.init_async_milvus_client() if self.async_milvus_client_wrap.async_milvus_client is not None:
loop = asyncio.get_event_loop() asyncio.run(self.async_milvus_client_wrap.close())
loop.run_until_complete(self.async_milvus_client_wrap.close())
super().teardown_method(method) super().teardown_method(method)
""" """