~/talk

Few Tools: How To Write And Understand! Coroutines Tests

Talkat Chicago Roboto 2022 · on Wednesday, 2022-07-27· [testing, kotlin]
links:none on file
slides:none on file

Claim: using the Kotlin coroutines APIs plus a little discipline makes coroutine tests far more readable and reliable. Demonstrations include a biometrics presenter, fake collaborators, channels and turbines (including a new channel-based turbine/turbine 0.9), runTest/runCurrent, timeouts, and molecule + Jetpack Compose wiring. Dangers shown: conceptual vs real race conditions, silent use of Dispatchers.Default, and why to inject CoroutineContext and prefer structured concurrency. Builds and tests mostly work but require the specific idioms shown.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 3:05Basic testing with turbine
  3. 7:56Conceptual vs. real races
  4. 12:36Using channels for control
  5. 17:01Addressing output races
  6. 22:21Testing for empty results
  7. 26:32Dispatcher pitfalls
  8. 32:43Structured concurrency
  9. 37:43Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.