Interview Prep/CI/CD/Testing and Quality Gates

What are flaky tests and how should a pipeline deal with them?

IntermediateConceptTesting and Quality Gates
Answer

A flaky test passes and fails on the same code, usually due to timing, shared state, test order, external dependencies or time-of-day assumptions. Blanket retries hide the problem and slow the pipeline. Better: detect flakes by tracking pass/fail per test over time, quarantine them into a non-blocking suite with an owner and deadline, fix root causes (fake clocks, isolated data, Testcontainers instead of shared DBs), and report flake rate as a metric.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Testing and Quality Gates