Find coroutine-test patterns

Proprietary

Search-only bundle for coroutine-testing primitives: runBlocking inside @Test, runBlockingTest (deprecated), TestCoroutineDispatcher (deprecated), JUnit 4 @Rule fields named after coroutines (hand-rolled MainCoroutineRule-style), and delay(...) calls inside a runBlocking test body.

org.openrewrite.kotlin.testing.FindCoroutineTestSmells$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.testing.FindCoroutineTestSmells$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find runBlocking { ... } calls inside test methods
  2. Find runBlockingTest { ... } calls
  3. Find TestCoroutineDispatcher allocations
  4. Find JUnit 4 coroutine-test @Rule fields
  5. Find delay(...) calls inside test methods running on a real dispatcher