Skip to content

Commit 78e5855

Browse files
committed
Don't mention UncompletedCoroutinesError in the docs
1 parent b858c9c commit 78e5855

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
@@ -142,13 +142,13 @@ public expect class TestResult
142142
* ### Failures
143143
*
144144
* This method requires that all coroutines launched inside [testBody] complete, or are cancelled. Otherwise, the test
145-
* will be failed (which, on JVM and Native, means that [runTest] itself will throw [UncompletedCoroutinesError],
145+
* will be failed (which, on JVM and Native, means that [runTest] itself will throw [AssertionError],
146146
* whereas on JS, the `Promise` will fail with it).
147147
*
148148
* In the general case, if there are active jobs, it's impossible to detect if they are going to complete eventually due
149149
* to the asynchronous nature of coroutines. In order to prevent tests hanging in this scenario, [runTest] will wait
150150
* for [dispatchTimeoutMs] milliseconds (by default, 10 seconds) from the moment when [TestCoroutineScheduler] becomes
151-
* idle before throwing [UncompletedCoroutinesError]. If some dispatcher linked to [TestCoroutineScheduler] receives a
151+
* idle before throwing [AssertionError]. If some dispatcher linked to [TestCoroutineScheduler] receives a
152152
* task during that time, the timer gets reset.
153153
*
154154
* Unhandled exceptions thrown by coroutines in the test will be rethrown at the end of the test.

0 commit comments

Comments
 (0)