We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60fd580 commit 4fc0a11Copy full SHA for 4fc0a11
common/kotlinx-coroutines-core-common/test/SupervisorTest.kt
@@ -106,6 +106,26 @@ class SupervisorTest : TestBase() {
106
}
107
108
109
+ @Test
110
+ fun testSupervisorFlaw() = runTest {
111
+ try {
112
+ supervisorScope {
113
+ expect(1)
114
+ launch {
115
+ // Test exception from supervisor is handled by launch though it clearly will be rethtown by supervisorScope{}
116
+ expect(2)
117
+ delay(Long.MAX_VALUE)
118
+ }
119
+
120
+ yield()
121
+ expect(3)
122
+ throw TestException1()
123
124
+ } catch (e: TestException1) {
125
+ finish(4)
126
127
128
129
@Test
130
fun testSupervisorWithParentCancelNormally() {
131
val parent = Job()
0 commit comments