milvus/tests20/python_client/scale/test_proxy_scale.py
ThreadDao 5bd32c910c
[skip ci] Add proxy pod scale test and change ci parallel num (#6856)
* add expand proxy pod test

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>

* test shrink proxy pod

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>

* [skip ci] change parallel_num num from auto back to 3

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
2021-07-28 17:01:22 +08:00

64 lines
1.8 KiB
Python

import pytest
from scale.helm_env import HelmEnv
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel
from scale import scale_common as sc
from scale import constants
prefix = "proxy_scale"
class TestProxyScale:
@pytest.mark.tags(CaseLabel.L3)
def test_expand_proxy(self):
"""
target: test milvus operation after proxy expand
method: 1.deploy two proxy pods
2.milvus e2e test
3.expand proxy pod from 1 to 2
4.milvus e2e test
expected: 1.verify data consistent and func work
"""
# deploy all nodes one pod cluster milvus with helm
release_name = "scale-proxy"
env = HelmEnv(release_name=release_name)
env.helm_install_cluster_milvus()
host = env.get_svc_external_ip()
# host = "10.98.0.8"
c_name = cf.gen_unique_str(prefix)
sc.e2e_milvus(host, c_name)
# scale proxy
env.helm_upgrade_cluster_milvus(proxy=2)
c_name_2 = cf.gen_unique_str(prefix)
sc.e2e_milvus(host, c_name_2)
def test_shrink_proxy(self):
"""
target: test shrink proxy pod from 2 to 1
method: 1.deploy two proxy node
2.e2e test
3.shrink proxy pods
4.e2e test
expected:
"""
# deploy all nodes one pod cluster milvus with helm
release_name = "scale-proxy"
env = HelmEnv(release_name=release_name, proxy=2)
env.helm_install_cluster_milvus()
host = env.get_svc_external_ip()
# host = "10.98.0.8"
c_name = cf.gen_unique_str(prefix)
sc.e2e_milvus(host, c_name)
# scale proxy
env.helm_upgrade_cluster_milvus(proxy=1)
c_name_2 = cf.gen_unique_str(prefix)
sc.e2e_milvus(host, c_name_2)