Concurrent testing checks multithreaded code for defects that depend on thread scheduling. The same input can succeed in one run and expose a race condition in another, because scheduling is indeterminate. section 11.2.2
Make tests easier to interpret by:
- Testing the smallest relevant piece of code; for a concurrent queue, test concurrent pushes and pops directly rather than through a larger application path. section 11.2.2
- Removing concurrency when possible. If the problem persists in a single-threaded test, it is a general bug rather than a concurrency-related one. section 11.2.2
