Deadlock

The Four Horsemen of the Test-Driven Apocalypse

Test-driven development (described on Wikipedia) is now widely accepted as the preferred way to develop software, especially Java software. I'm an enthusiastic supporter of this predilection - but there is a problem people seem often to overlook. I call it The Four Horsemen (also on Wikipedia) because there are four potentially major dynamic problems unreachable by testing alone. The problems are: Race Conditions - instability due to concurrent threads changing shared data without sufficient protective locking Deadlock - freezing-up of concurrent threads that have a mutual dependency that cannot ever be satisfied Livelock - similar to deadlock, livelock is a condition in which concurrent threads waste time trying to acquire resources that cannot ever be satisfied due to the mutual dependency between the threads.