5 ms·
> I would posit here that nothing I could do in best practice (manual front-end testing, unit testing, error handling, etc.) would have caught the offending lin
by jroseattle 15y ago
> I would posit here that nothing I could do in best practice (manual front-end testing, unit testing, error handling, etc.) would have caught the offending line.
Sorry, that's incorrect. If you cannot fully simulate your environment for purposes of validation, you're not covering your bases.
- wanorris 15y agoAre you saying that the definition of an adequate test setup is one that will necessarily catch any possible race conditions? That sounds like a necessary idea if you're building real-time embedded systems for aircraft operation or something, but for a lot of applications, developing a test harness to that standard would take considerably more time and effort than building out the actual product.
- jroseattle 15y agoThe problem wasn't a race condition, it was an improperly scoped variable. If a different variable name had been used, the failure would have been easy to identify. Testing for the result of something improper wouldn't be appropriate here, either. But, if the environment is such that it is easy to manifest this condition, I would argue that such a test setup should definitely be considered, given the potential for failure.