mirror of https://github.com/milvus-io/milvus.git
try connect set false (#2443)
* update shards deploy method Signed-off-by: zw <zw@milvus.io> * update run level Signed-off-by: zw <zw@milvus.io> * try connect set false Signed-off-by: zw <zw@milvus.io> * update shards deploy branch Signed-off-by: zw <zw@milvus.io> Co-authored-by: zw <zw@milvus.io>pull/2469/head
parent
d3eecfd8b5
commit
eefc152290
|
@ -3,7 +3,8 @@ timeout(time: 180, unit: 'MINUTES') {
|
|||
sh 'helm version'
|
||||
sh 'helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts'
|
||||
sh 'helm repo update'
|
||||
checkout([$class: 'GitSCM', branches: [[name: "nightly"]], userRemoteConfigs: [[url: "https://github.com/milvus-io/milvus-helm.git", name: 'origin', refspec: "+refs/heads/nightly:refs/remotes/origin/nightly"]]])
|
||||
checkout([$class: 'GitSCM', branches: [[name: "${env.HELM_BRANCH}"]], userRemoteConfigs: [[url: "https://github.com/milvus-io/milvus-helm.git", name: 'origin', refspec: "+refs/heads/${env.HELM_BRANCH}:refs/remotes/origin/${env.HELM_BRANCH}"]]])
|
||||
|
||||
retry(3) {
|
||||
try {
|
||||
sh "helm install --wait --timeout 300s --set cluster.enabled=true --set persistence.enabled=true --set image.repository=registry.zilliz.com/milvus/engine --set mishards.image.tag=test --set image.tag=${DOCKER_VERSION} --set image.pullPolicy=Always --set service.type=ClusterIP -f ci/db_backend/mysql_${BINARY_VERSION}_values.yaml --namespace milvus ${env.SHARDS_HELM_RELEASE_NAME} ."
|
||||
|
|
|
@ -594,12 +594,12 @@ class TestAddBase:
|
|||
pytest.skip("Skip test in http mode")
|
||||
thread_num = 8
|
||||
threads = []
|
||||
milvus = get_milvus(host=args["ip"], port=args["port"], handler=args["handler"])
|
||||
milvus = get_milvus(host=args["ip"], port=args["port"], handler=args["handler"], try_connect=False)
|
||||
vectors = gen_vectors(nb, dim)
|
||||
def add(thread_i):
|
||||
logging.getLogger().info("In thread-%d" % thread_i)
|
||||
milvus = get_milvus(host=args["ip"], port=args["port"], handler=args["handler"])
|
||||
assert milvus
|
||||
# milvus = get_milvus(host=args["ip"], port=args["port"], handler=args["handler"])
|
||||
# assert milvus
|
||||
status, result = milvus.insert(collection, records=vectors)
|
||||
assert status.OK()
|
||||
status = milvus.flush([collection])
|
||||
|
|
|
@ -24,13 +24,14 @@ all_index_types = [
|
|||
]
|
||||
|
||||
|
||||
def get_milvus(host, port, uri=None, handler=None):
|
||||
def get_milvus(host, port, uri=None, handler=None, **kwargs):
|
||||
if handler is None:
|
||||
handler = "GRPC"
|
||||
try_connect = kwargs.get("try_connect", True)
|
||||
if uri is not None:
|
||||
milvus = Milvus(uri=uri, handler=handler)
|
||||
milvus = Milvus(uri=uri, handler=handler, try_connect=try_connect)
|
||||
else:
|
||||
milvus = Milvus(host=host, port=port, handler=handler)
|
||||
milvus = Milvus(host=host, port=port, handler=handler, try_connect=try_connect)
|
||||
return milvus
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue