Package kotlinx.coroutines.debug.junit4


Link copied to clipboard
class CoroutinesTimeout(    testTimeoutMs: Long,     cancelOnTimeout: Boolean = false,     enableCoroutineCreationStackTraces: Boolean = true) : TestRule

Coroutines timeout rule for JUnit4 that is applied to all methods in the class. This rule is very similar to Timeout rule: it runs tests in a separate thread, fails tests after the given timeout and interrupts test thread.