Skip to content

Commit

Permalink
Don't mention UncompletedCoroutinesError in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed Oct 27, 2021
1 parent b858c9c commit 78e5855
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kotlinx-coroutines-test/common/src/TestBuilders.kt
Expand Up @@ -142,13 +142,13 @@ public expect class TestResult
* ### Failures
*
* This method requires that all coroutines launched inside [testBody] complete, or are cancelled. Otherwise, the test
* will be failed (which, on JVM and Native, means that [runTest] itself will throw [UncompletedCoroutinesError],
* will be failed (which, on JVM and Native, means that [runTest] itself will throw [AssertionError],
* whereas on JS, the `Promise` will fail with it).
*
* In the general case, if there are active jobs, it's impossible to detect if they are going to complete eventually due
* to the asynchronous nature of coroutines. In order to prevent tests hanging in this scenario, [runTest] will wait
* for [dispatchTimeoutMs] milliseconds (by default, 10 seconds) from the moment when [TestCoroutineScheduler] becomes
* idle before throwing [UncompletedCoroutinesError]. If some dispatcher linked to [TestCoroutineScheduler] receives a
* idle before throwing [AssertionError]. If some dispatcher linked to [TestCoroutineScheduler] receives a
* task during that time, the timer gets reset.
*
* Unhandled exceptions thrown by coroutines in the test will be rethrown at the end of the test.
Expand Down

0 comments on commit 78e5855

Please sign in to comment.