Skip to content

Suiteopensavvy.prepared.suite.configCoroutineTimeout

CoroutineTimeout

data class CoroutineTimeout(val duration: Duration) : TestConfig.Element

Defines for how long nothing is allowed to happen before the test is automatically stopped.

Note that this only applies to nothing happening in the coroutine dispatcher managed by the Coroutines system: launch, launchInBackground, etc.

For example, this test never finishes, but will not be stopped by this timeout, because coroutines are still being executed:

while(true) {
    delay(1000)
}

Constructors

CoroutineTimeout

constructor(duration: Duration)

Types

Companion

Properties

coroutineContext

The coroutine context configured for this test through the Context configuration.

duration

key

open override val key: CoroutineTimeout.Companion

The identifier for this test configuration element.

Functions

get

Finds the elements identified by key in the current TestConfig.

Finds the Element identified by key in the current TestConfig.

plus

operator fun TestConfig.plus(other: TestConfig): TestConfig

Combines two TestConfig instances.