Skip to content

Commit e86dc85

Browse files
authored
Improve the binary compatibility of runTest$default further (Kotlin#3753)
Follow-up to Kotlin#3742. That implementation there did work around issue Kotlin#3673, but did not restore full binary compatibility: the wrong value of `dispatchTimeoutMs` was passed. Given how `runTest` was used in the problematic library, it should not be a problem, but just to be safe and establish the same behavior even in the deep corner cases, we restore the original implementation fully.
1 parent c28837a commit e86dc85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kotlinx-coroutines-test/common/src/TestBuilders.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,6 @@ internal expect fun dumpCoroutines()
580580
public fun TestScope.runTestLegacy(
581581
dispatchTimeoutMs: Long,
582582
testBody: suspend TestScope.() -> Unit,
583-
unused1: Int,
583+
marker: Int,
584584
unused2: Any?,
585-
): TestResult = runTest(dispatchTimeoutMs, testBody)
585+
): TestResult = runTest(dispatchTimeoutMs = if (marker and 1 != 0) dispatchTimeoutMs else 60_000L, testBody)

0 commit comments

Comments
 (0)