Skip to content

Commit

Permalink
Improve the binary compatibility of runTest$default further (#3753)
Browse files Browse the repository at this point in the history
Follow-up to #3742.
That implementation there did work around issue #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.
  • Loading branch information
dkhalanskyjb authored May 12, 2023
1 parent c28837a commit e86dc85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kotlinx-coroutines-test/common/src/TestBuilders.kt
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,6 @@ internal expect fun dumpCoroutines()
public fun TestScope.runTestLegacy(
dispatchTimeoutMs: Long,
testBody: suspend TestScope.() -> Unit,
unused1: Int,
marker: Int,
unused2: Any?,
): TestResult = runTest(dispatchTimeoutMs, testBody)
): TestResult = runTest(dispatchTimeoutMs = if (marker and 1 != 0) dispatchTimeoutMs else 60_000L, testBody)

0 comments on commit e86dc85

Please sign in to comment.