You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kotlinx-coroutines-test/api/kotlinx-coroutines-test.api
+5-4
Original file line number
Diff line number
Diff line change
@@ -34,15 +34,16 @@ public final class kotlinx/coroutines/test/TestCoroutineDispatcher : kotlinx/cor
34
34
public fun toString ()Ljava/lang/String;
35
35
}
36
36
37
-
public final class kotlinx/coroutines/test/TestCoroutineExceptionHandler : kotlin/coroutines/AbstractCoroutineContextElement, kotlinx/coroutines/CoroutineExceptionHandler, kotlinx/coroutines/test/UncaughtExceptionCaptor {
37
+
public final class kotlinx/coroutines/test/TestCoroutineExceptionHandler : kotlin/coroutines/AbstractCoroutineContextElement, kotlinx/coroutines/CoroutineExceptionHandler {
38
38
public fun <init> ()V
39
-
public fun cleanupTestCoroutines ()V
40
-
public fun getUncaughtExceptions ()Ljava/util/List;
39
+
public final fun cleanupTestCoroutines ()V
40
+
public final fun getUncaughtExceptions ()Ljava/util/List;
41
41
public fun handleException (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Throwable;)V
42
42
}
43
43
44
-
public abstract interface class kotlinx/coroutines/test/TestCoroutineScope : kotlinx/coroutines/CoroutineScope, kotlinx/coroutines/test/DelayController, kotlinx/coroutines/test/UncaughtExceptionCaptor {
44
+
public abstract interface class kotlinx/coroutines/test/TestCoroutineScope : kotlinx/coroutines/CoroutineScope, kotlinx/coroutines/test/DelayController {
45
45
public abstract fun cleanupTestCoroutines ()V
46
+
public abstract fun getUncaughtExceptions ()Ljava/util/List;
46
47
}
47
48
48
49
public final class kotlinx/coroutines/test/TestCoroutineScopeKt {
Copy file name to clipboardExpand all lines: kotlinx-coroutines-test/src/TestCoroutineExceptionHandler.kt
+18-8
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import kotlin.coroutines.*
10
10
/**
11
11
* Access uncaught coroutine exceptions captured during test execution.
12
12
*/
13
-
@ExperimentalCoroutinesApi // Since 1.2.1, tentatively till 1.3.0
13
+
@Deprecated("Consider whether a plain `CoroutineExceptionHandler` would suffice. If not, please report your use case at https://github.com/Kotlin/kotlinx.coroutines/issues.", level =DeprecationLevel.ERROR)
14
14
publicinterfaceUncaughtExceptionCaptor {
15
15
/**
16
16
* List of uncaught coroutine exceptions.
@@ -33,27 +33,37 @@ public interface UncaughtExceptionCaptor {
33
33
34
34
/**
35
35
* An exception handler that captures uncaught exceptions in tests.
36
+
*
37
+
* In order to work as intended, this exception handler requires that the [Job] of the test coroutine scope is a
38
+
* [SupervisorJob].
36
39
*/
37
-
@ExperimentalCoroutinesApi // Since 1.2.1, tentatively till 1.3.0
40
+
// @Deprecated("In order to work correctly, this exception handler requires that " +
41
+
42
+
// "the test coroutine scope's Job is a SupervisorJob, which may lead to tests running indefinitely " +
43
+
// "instead of quickly crashing. Please consider specifying another `CoroutineExceptionHandler`", level = DeprecationLevel.WARNING)
0 commit comments