An integration test in your pipeline fails about one run in five, yet a rerun almost always passes. Which response follows recommended practice for keeping the pipeline trustworthy?
Show answer and explanation
Answer: C
Flaky tests erode trust in the pipeline. The usual practice is to quarantine the test so it no longer blocks merges, record the failure in a tracked work item, and investigate the root cause, such as a race condition, shared state or an unstable dependency. The test returns to gating once it is reliable. Automatic retries hide the defect, permanent disabling silently drops coverage, and deleting the test removes the check entirely. Quarantine keeps the signal visible while protecting delivery.
Why the other options are wrong
- A. Permanently disabling the test removes coverage without fixing the defect, and nothing prompts anyone to revisit it. Quarantine keeps the test visible and time-boxed.
- B. Automatic retries can make a real intermittent bug look like a pass, so regressions slip through. Retries hide the root cause instead of removing it.
- D. Deleting the test discards the only check for that behavior and leaves the underlying defect undetected. The problem lies in the test or its environment, and it can be fixed.