This chapter was written around the idea of providing you with good practices that would make it easier for you to write and maintain concurrent applications written in Kotlin. Let's summarize the topics and practices discussed in this book so far, so that they stay fresh in your mind:
- There are two important principles when it comes to tests for concurrent code: throw away assumptions, meaning write tests for scenarios that should not happen to make sure that your app is resilient; and focus on the forest, not the trees, meaning that when testing for concurrency, you have to work on Functional Tests that allow you to replicate both the expected and the unexpected from a higher level.
- More advice on testing: always write tests for a bug when fixing it; analyze if a bug can be replicated in places where it has not been reported and write tests to cover those scenarios...