Skip to content

Commit e7015e7

Browse files
committed
Increase the timeout for real time tests
Especially tests using local servers tend to overshoot the default 1m timeout.
1 parent 3530209 commit e7015e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/commonTest/kotlin/org/hildan/chrome/devtools/RealTimeTestScope.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import kotlinx.coroutines.plus
77
import kotlinx.coroutines.test.runTest
88
import kotlinx.coroutines.withContext
99
import kotlin.coroutines.CoroutineContext
10+
import kotlin.time.Duration.Companion.minutes
1011

1112
interface RealTimeTestScope : CoroutineScope {
1213
val backgroundScope: CoroutineScope
@@ -18,7 +19,7 @@ interface RealTimeTestScope : CoroutineScope {
1819
fun runTestWithRealTime(
1920
nestedContext: CoroutineContext = Dispatchers.Default,
2021
block: suspend RealTimeTestScope.() -> Unit,
21-
) = runTest {
22+
) = runTest(timeout = 3.minutes) { // increased timeout for local server setup
2223
val testScopeBackground = backgroundScope + CoroutineExceptionHandler { _, e ->
2324
println("Error in background scope: $e")
2425
}

0 commit comments

Comments
 (0)