File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/test Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import io.kotest.engine.test.interceptors.blockedThreadTimeoutInterceptor
28
28
import io.kotest.engine.test.interceptors.coroutineDispatcherFactoryInterceptor
29
29
import io.kotest.engine.test.interceptors.coroutineErrorCollectorInterceptor
30
30
import io.kotest.mpp.Logger
31
+ import kotlin.time.Duration
31
32
import kotlin.time.TimeSource
32
33
33
34
/* *
@@ -71,7 +72,11 @@ class TestCaseExecutor(
71
72
val innerExecute: suspend (TestCase , TestScope ) -> TestResult = { tc, scope ->
72
73
logger.log { Pair (testCase.name.testName, " Executing test" ) }
73
74
tc.test(scope)
74
- TestResult .Success (timeMark.elapsedNow())
75
+ try {
76
+ TestResult .Success (timeMark.elapsedNow())
77
+ } catch (e: Throwable ) {
78
+ TestResult .Success (Duration .ZERO ) // workaround for kotlin 1.5
79
+ }
75
80
}
76
81
77
82
return interceptors.foldRight(innerExecute) { ext, fn ->
You can’t perform that action at this time.
0 commit comments