Skip to content

Commit a899da7

Browse files
committed
Fix Milvus ML tests
1 parent b380024 commit a899da7

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

sdks/python/apache_beam/ml/rag/ingestion/milvus_search_it_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from apache_beam.ml.rag.utils import retry_with_backoff
3535
from apache_beam.ml.rag.utils import unpack_dataclass_with_kwargs
3636
from apache_beam.testing.test_pipeline import TestPipeline
37+
3738
# pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
3839
try:
3940
from pymilvus import CollectionSchema

sdks/python/apache_beam/ml/rag/test_utils.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class CustomMilvusContainer(MilvusContainer):
8787
Extends MilvusContainer to provide custom port binding and environment
8888
configuration for testing with standalone Milvus instances.
8989
"""
90-
def __init__(
90+
91+
def __init__( # pylint: disable=bad-super-call
9192
self,
9293
image: str,
9394
service_container_port,
@@ -96,7 +97,11 @@ def __init__(
9697
) -> None:
9798
# Skip the parent class's constructor and go straight to
9899
# GenericContainer.
99-
super(MilvusContainer, self).__init__(image=image, **kwargs)
100+
super(
101+
MilvusContainer,
102+
self,
103+
).__init__(
104+
image=image, **kwargs)
100105
self.port = service_container_port
101106
self.healthcheck_port = healthcheck_container_port
102107
self.with_exposed_ports(service_container_port, healthcheck_container_port)
@@ -135,8 +140,10 @@ class MilvusTestHelpers:
135140
# Example: Milvus v2.6.0 requires pymilvus==2.6.0 (exact match required).
136141
@staticmethod
137142
def _wait_for_milvus_grpc(uri: str) -> None:
138-
"""Wait until Milvus accepts RPCs; Docker reports started before gRPC is ready."""
143+
"""Wait until Milvus accepts RPCs.
139144
145+
Docker may report started before gRPC is ready.
146+
"""
140147
def list_collections_probe():
141148
client = MilvusClient(uri=uri)
142149
try:

0 commit comments

Comments
 (0)