appleTest.RunTest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of websocket Show documentation
Show all versions of websocket Show documentation
Simple multiplatform kotlin coroutines based websocket.
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withTimeout
actual fun block(body: suspend CoroutineScope.() -> T) {
runBlocking {
withTimeout(15000) {
try {
body()
} catch (e: UnsupportedOperationException) {
println("Test hit unsupported code, ignoring")
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy