4 ms·
THIS! is why you should always write tests.
by chris-allnutt 13y ago
THIS! is why you should always write tests.
- wtetzner 13y agoActually, concurrency is one of the areas where tests aren't particularly reliable. Whether the tests pass might depend on how the threads happened to be scheduled on that particular run.
- mark-r 13y agoTests don't always catch everything, especially in multi-threaded code. Something more was needed in this case.
- chris-allnutt 13y agoTo those who disagree with me. Testing was needed, and is reliable, not saying there is something in place that would have solved this particular instance but saying "not particularly reliable" means that you haven't properly addressed the problem. If you can't write a test that tells you your code works, then how can you as a human verify it passes all required cases manually reliably. YES, I have written tests in multi-threaded situations before. Your aversion to trying it doesn't make my statement wrong.