File tree Expand file tree Collapse file tree 2 files changed +1
-24
lines changed
sdk/python/tests/integration/feature_repos Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change 8989)
9090
9191DYNAMO_CONFIG = {"type" : "dynamodb" , "region" : "us-west-2" }
92- MILVUS_CONFIG = {"type" : "milvus" , "embedding_dim" : "2 " }
92+ MILVUS_CONFIG = {"type" : "milvus" , "embedding_dim" : 2 , "path" : "online_store.db " }
9393REDIS_CONFIG = {"type" : "redis" , "connection_string" : "localhost:6379,db=0" }
9494REDIS_CLUSTER_CONFIG = {
9595 "type" : "redis" ,
Original file line number Diff line number Diff line change 11from typing import Any , Dict
22
3- import docker
4- from testcontainers .core .container import DockerContainer
5- from testcontainers .core .waiting_utils import wait_for_logs
6-
73from tests .integration .feature_repos .universal .online_store_creator import (
84 OnlineStoreCreator ,
95)
128class MilvusOnlineStoreCreator (OnlineStoreCreator ):
139 def __init__ (self , project_name : str , ** kwargs ):
1410 super ().__init__ (project_name )
15- self .fixed_port = 19530
16- self .container = DockerContainer ("milvusdb/milvus:v2.4.9" ).with_exposed_ports (
17- self .fixed_port
18- )
19- self .client = docker .from_env ()
2011
2112 def create_online_store (self ) -> Dict [str , Any ]:
22- self .container .start ()
23- # Wait for Milvus server to be ready
24- # log_string_to_wait_for = "Ready to accept connections"
25- log_string_to_wait_for = ""
26- wait_for_logs (
27- container = self .container , predicate = log_string_to_wait_for , timeout = 30
28- )
29- host = "http://localhost"
30- port = self .container .get_exposed_port (self .fixed_port )
3113 return {
3214 "type" : "milvus" ,
33- "host" : host ,
34- "port" : int (port ),
3515 "path" : "online_store.db" ,
3616 "index_type" : "IVF_FLAT" ,
3717 "metric_type" : "L2" ,
3818 "embedding_dim" : 2 ,
3919 "vector_enabled" : True ,
4020 "nlist" : 1 ,
4121 }
42-
43- def teardown (self ):
44- self .container .stop ()
You can’t perform that action at this time.
0 commit comments