From ff88c76e3c42dcc54294829408cab416c84506d8 Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Fri, 8 Sep 2023 13:16:48 +0200 Subject: [PATCH] [K/N] Parse duration for EXECUTION_TIMEOUT --- .../kotlin/konan/blackboxtest/support/NativeTestSupport.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt index 4884d849b73..24c1101c472 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt @@ -38,7 +38,7 @@ import java.net.URLClassLoader import kotlin.reflect.KClass import kotlin.reflect.KParameter import kotlin.reflect.full.findAnnotation -import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.Duration class NativeBlackBoxTestSupport : BeforeEachCallback { /** @@ -331,7 +331,7 @@ private object NativeTestSupport { private fun computeTimeouts(enforcedProperties: EnforcedProperties): Timeouts { val executionTimeout = ClassLevelProperty.EXECUTION_TIMEOUT.readValue( enforcedProperties, - { it.toLongOrNull()?.milliseconds }, + { Duration.parseOrNull(it) }, default = Timeouts.DEFAULT_EXECUTION_TIMEOUT ) return Timeouts(executionTimeout)