From 78e5855c1eea73b9cea4c28247aa42ba8093a766 Mon Sep 17 00:00:00 2001 From: Dmitry Khalanskiy Date: Wed, 27 Oct 2021 10:49:28 +0300 Subject: [PATCH] Don't mention UncompletedCoroutinesError in the docs --- kotlinx-coroutines-test/common/src/TestBuilders.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotlinx-coroutines-test/common/src/TestBuilders.kt b/kotlinx-coroutines-test/common/src/TestBuilders.kt index 75e5244e2e..c60a5155f5 100644 --- a/kotlinx-coroutines-test/common/src/TestBuilders.kt +++ b/kotlinx-coroutines-test/common/src/TestBuilders.kt @@ -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.