Test Coverage Applies To *All* Your Code!
Way back in 2014 Yuan et al conducted an analysis of production failures that brought down distributed systems (•). They went through 198 random failures in well known distributed systems like Cassandra, Hadoop, and whatnot, and, well, the results were remarkably depressing. Basically, they found that for most of the catastrophic failures — where the entire system went down — the root cause was ridiculously simple. How simple you ask? Well, it turns out that around 90% of them boiled down to non-fatal errors that weren’t handled correctly. Yeah, I’ll let that sink in for a bit. Bad error handling. That’s it. Ok, now that it’s sunk in, let’s make it worse. 35% of the catastrophic failures boiled down to one of the following three scenarios 1. The error-handler catches an overly general exception (e.g. an Exception or Throwable in Java), and then shuts the whole damn thing down. BOOM. 2. Or, better yet, the error-handler a...