mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
Chaos Tests
Goal
Chaos tests are designed to check the reliability of Milvus.
For instance, if one pod is killed:
- verify that it restarts automatically
- verify that the related operation fails, while the other operations keep working successfully during the absence of the pod
- verify that all the operations work successfully after the pod back to running state
- verify that no data lost
Prerequisite
Chaos tests run in pytest framework, same as e2e tests.
Please refer to Run E2E Tests
Test Scenarios
Milvus in cluster mode
-
root coordinator pod is killed
-
proxy pod is killed
-
data coordinator pod is killed
-
data node pod is killed
-
index coordinator pod is killed
-
index node pod is killed
-
query coordinator pod is killed
-
query node pod is killed
-
minio pod is killed
Milvus in standalone mode
-
standalone pod is killed
-
minio pod is killed
How it works
- Test scenarios are designed by different chaos objects
- Every chaos object is defined in one yaml file locates in folder
chaos_objects - Every chaos yaml file specified by
ALL_CHAOS_YAMLSinconstants.pywould be parsed as a parameter and be passed intotest_chaos.py - All expectations of every scenario are defined in
testcases.yamllocates in folderchaos_objects - Chaos Mesh is used to inject chaos into Milvus in
test_chaos.py
Run
Manually
Run a single test scenario manually(take query node pod is killed as instance):
-
update
ALL_CHAOS_YAMLS = 'chaos_querynode*.yaml'inconstants.py -
run the commands below:
cd /milvus/tests/python_client/chaos
pytest test_chaos.py --host x.x.x.x -v
Nightly
still in planning