r/programming • • May 09 '15

"Real programmers can do these problems easily"; author posts invalid solution to #4

https://blog.svpino.com/2015/05/08/solution-to-problem-4
3.1k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

3

u/billatq May 09 '15

If you have non-deterministic tests, you had better make sure you provide all the context you could possibly need to determine the problem. Otherwise it'll just be treated as "that flaky unit test" which requires a second run sometimes.

1

u/ISvengali May 09 '15

This was more for everything but production, and maybe loadtest. Debug, dev, etc.

Every failure on tests needs to be followed up on. Then you either need to fix the bug, or fix the testing. If a test relies on something inherently flakey for whatever reason, it should handle the flakeyness and note it as a warning and continue.

Ide agree with the non-determinism though. Be sure to capture enough state to repro and it makes tracking the real issue down much faster. When I fuzz test I make sure to do that.