diff --git a/.github/workflows/pod-failure-chaos-test.yaml b/.github/workflows/pod-failure-chaos-test.yaml index e4c09864b6..8802606904 100644 --- a/.github/workflows/pod-failure-chaos-test.yaml +++ b/.github/workflows/pod-failure-chaos-test.yaml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - pod: [querynode, datanode, indexnode] + pod: [querynode, datanode, indexnode, proxy] steps: @@ -61,7 +61,7 @@ jobs: shell: bash working-directory: tests/python_client/chaos run: | - declare -A pod_map=( ["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode") + declare -A pod_map=( ["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode" ["proxy"]="proxy") helm repo add milvus https://milvus-io.github.io/milvus-helm helm repo update helm install --wait --timeout 360s milvus-chaos milvus/milvus --set ${pod_map[${{ matrix.pod }}]}.replicas=2 -f cluster-values.yaml -n=chaos-testing diff --git a/tests/python_client/chaos/chaos_objects/pod_failure/chaos_proxy_pod_failure.yaml b/tests/python_client/chaos/chaos_objects/pod_failure/chaos_proxy_pod_failure.yaml new file mode 100644 index 0000000000..023bd87251 --- /dev/null +++ b/tests/python_client/chaos/chaos_objects/pod_failure/chaos_proxy_pod_failure.yaml @@ -0,0 +1,16 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: test-querynode-pod-failure + namespace: chaos-testing +spec: + selector: + namespaces: + - chaos-testing + labelSelectors: + app.kubernetes.io/instance: milvus-chaos + component: proxy + mode: one + action: pod-failure + duration: 2m + gracePeriod: 0 \ No newline at end of file diff --git a/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml b/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml index fe65c860a3..fc755a846b 100644 --- a/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml +++ b/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml @@ -16,8 +16,6 @@ Collections: search: fail query: fail cluster_n_nodes: - search: succ - query: succ - testcase: name: test_indexnode_pod_failure @@ -26,7 +24,6 @@ Collections: cluster_1_node: index: fail cluster_n_nodes: - index: succ - testcase: @@ -36,4 +33,17 @@ Collections: cluster_1_node: insert: fail cluster_n_nodes: - insert: succ + + - + testcase: + name: test_proxy_pod_failure + chaos: chaos_proxy_pod_failure.yaml + expectation: + cluster_1_node: + create: fail + insert: fail + flush: fail + index: fail + search: fail + query: fail + cluster_n_nodes: \ No newline at end of file diff --git a/tests/python_client/chaos/test_chaos.py b/tests/python_client/chaos/test_chaos.py index 82ea980c76..b7e20a9bc4 100644 --- a/tests/python_client/chaos/test_chaos.py +++ b/tests/python_client/chaos/test_chaos.py @@ -49,7 +49,8 @@ class TestChaosBase: node_map = { "querynode": "query_nodes", "datanode": "data_nodes", - "indexnode": "index_nodes" + "indexnode": "index_nodes", + "proxy": "proxy_nodes" } for t in test_collections: test_chaos = t.get('testcase', {}).get('chaos', {})