CICD-344 · Circuit breaker testing
Encyclopedia · Distributed systems and reliability testing · All snippets
Previous · CICD-343 · Next · CICD-345
1. Where it fits
- Placement CI run step.
- Prerequisites disposable integration environment, synthetic traffic and controlled test faults.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
pytest -q tests/reliability -k 'circuit_opens or half_open'3. How it works
Pytest discovers the selected test files or markers and returns a process exit status reflecting the test outcome.
4. Verify the result
Assert closed, open and half-open transitions against a fake dependency and a fake clock.
Validation syntax-validated (Bash parse). Status definitions.