Comparison
Flaky testvsRace condition
Flaky test
the test fails one run in twenty, everyone reruns CI until it goes green, and the suite stops meaning anything.
A test that passes and fails without code changes, usually because of timing, ordering, shared state or real network calls. Its real damage is cultural: once reruns are normal, genuine failures get rerun too. Quarantine or delete flaky tests immediately — a test nobody believes is worse than no test.
Full entry →Race condition
the bug only shows up under load, never in tests, and the outcome depends on which of two threads got there first.
A defect where the result depends on the unpredictable relative timing of concurrent operations. The signature is irreproducibility: it happens once every ten thousand requests and never in a debugger. Most are read-modify-write sequences that need to be atomic and are not.
Full entry →