diff --git a/kotest-framework/kotest-framework-engine/src/jvmTest/kotlin/com/sksamuel/kotest/engine/coroutines/provokeThreadSwitch.kt b/kotest-framework/kotest-framework-engine/src/jvmTest/kotlin/com/sksamuel/kotest/engine/coroutines/provokeThreadSwitch.kt index 8818669856d..8f16f088ff9 100644 --- a/kotest-framework/kotest-framework-engine/src/jvmTest/kotlin/com/sksamuel/kotest/engine/coroutines/provokeThreadSwitch.kt +++ b/kotest-framework/kotest-framework-engine/src/jvmTest/kotlin/com/sksamuel/kotest/engine/coroutines/provokeThreadSwitch.kt @@ -2,9 +2,9 @@ package com.sksamuel.kotest.engine.coroutines /** * Provoke the dispatcher to switch coroutine threads by keeping the coroutine alive for a sufficient time period. + * + * This function is not suspending, but intended to be invoked in a coroutine exclusively. */ -@Suppress("RedundantSuspendModifier") -suspend fun provokeThreadSwitch() { - @Suppress("BlockingMethodInNonBlockingContext") +internal fun provokeThreadSwitch() { Thread.sleep(50) }