diff --git a/.github/workflows/pod-failure-chaos-test.yaml b/.github/workflows/pod-failure-chaos-test.yaml index 243931291d..e4c09864b6 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] + pod: [querynode, datanode, indexnode] steps: @@ -61,7 +61,7 @@ jobs: shell: bash working-directory: tests/python_client/chaos run: | - declare -A pod_map=( ["querynode"]="queryNode") + declare -A pod_map=( ["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode") 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_indexnode_pod_failure.yaml b/tests/python_client/chaos/chaos_objects/pod_failure/chaos_indexnode_pod_failure.yaml new file mode 100644 index 0000000000..68a60c1633 --- /dev/null +++ b/tests/python_client/chaos/chaos_objects/pod_failure/chaos_indexnode_pod_failure.yaml @@ -0,0 +1,16 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: test-indexnode-pod-failure + namespace: chaos-testing +spec: + selector: + namespaces: + - chaos-testing + labelSelectors: + app.kubernetes.io/instance: milvus-chaos + component: indexnode + mode: one + action: pod-failure + duration: 2m + gracePeriod: 0 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 594a1bf521..fe65c860a3 100644 --- a/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml +++ b/tests/python_client/chaos/chaos_objects/pod_failure/testcases.yaml @@ -18,4 +18,22 @@ Collections: cluster_n_nodes: search: succ query: succ + - + testcase: + name: test_indexnode_pod_failure + chaos: chaos_indexnode_pod_failure.yaml + expectation: + cluster_1_node: + index: fail + cluster_n_nodes: + index: succ + - + testcase: + name: test_datanode_pod_failure + chaos: chaos_datanode_pod_failure.yaml + expectation: + cluster_1_node: + insert: fail + cluster_n_nodes: + insert: succ