Testing concurrent code
When it comes to tests, the important thing is not to just have them, but to have the correct ones. If we are thinking specifically about concurrency, there are two principles that I consider the foundations of correct testing. Let's turn our minds to a basic example, as a way to discuss those principles.
Consider a simple application that takes the identifier of a user and needs to retrieve, organize, and then return a defined set of information for that user. Now, some of that information will be readily available in the database of that application. Other information may need to come from a cache shared among instances of the application. And finally, some specific information will be retrieved from a different ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access