Go to content

How we test concurrent algorithms in Kotlin Coroutines by Nikita Koval

Recording brought to you by American Express. https://americanexpress.io/kotlin-jobs 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. Talk by: Nikita Koval #coroutines #KotlinConf

April 12, 2023