Nikita is a researcher in the Kotlin team at JetBrains and is pursuing a Ph.D. in the field of concurrency. He has spent recent years enhancing synchronization algorithms in Kotlin Coroutines, including channels, mutexes, and semaphores. His main professional interests lie in concurrent data structures, algorithms, their verification, and practical code analysis.
Nikita Koval
Lincheck: Testing Concurrent Algorithms on JVM
Writing a good and robust concurrent test may be as challenging as implementing the algorithm, if not more so. In Kotlin Coroutines, we maintain a dozen non-trivial concurrent data structures, such as queues, semaphores, and channels. We need to test them properly. Straightforward stress tests likely do not catch all bugs and flack. Such testing quality is below the bar. We need a way to write concurrent tests in a handy, declarative way, keeping in mind "what to test," not "how."
At JetBrains, we've developed Lincheck, a unique framework that makes writing concurrent tests a piece of cake. Users just need to list all the data structure operations, and Lincheck verifies whether these operations are thread-safe or not. In this talk, I will share how we use Linchek in Kotlin Coroutines, how to apply it to your setting, and briefly cover the framework internals.