@@ -13,7 +13,6 @@ import org.junit.Assert.*
1313import org.junit.Test
1414import java.io.*
1515import java.util.concurrent.*
16- import kotlin.reflect.*
1716import kotlin.test.assertFailsWith
1817
1918class ListenableFutureTest : TestBase () {
@@ -269,21 +268,6 @@ class ListenableFutureTest : TestBase() {
269268 result.checkFutureException<TestException >()
270269 }
271270
272- @Test
273- fun testExceptionAggregation () = runTest {
274- val result = future(Dispatchers .Unconfined ) {
275- // child crashes
276- launch(start = CoroutineStart .ATOMIC ) { throw TestException1 (" FAIL" ) }
277- launch(start = CoroutineStart .ATOMIC ) { throw TestException2 (" FAIL" ) }
278- throw TestException ()
279- }
280-
281- expect(1 )
282- result.checkFutureException<TestException >(TestException1 ::class , TestException2 ::class )
283- yield ()
284- finish(2 ) // we are not cancelled
285- }
286-
287271 @Test
288272 fun testExternalCancellation () = runTest {
289273 val future = future(Dispatchers .Unconfined ) {
@@ -316,13 +300,10 @@ class ListenableFutureTest : TestBase() {
316300 finish(3 )
317301 }
318302
319- private inline fun <reified T : Throwable > ListenableFuture <* >.checkFutureException (vararg suppressed : KClass < out Throwable > ) {
303+ private inline fun <reified T : Throwable > ListenableFuture <* >.checkFutureException () {
320304 val e = assertFailsWith<ExecutionException > { get() }
321305 val cause = e.cause!!
322306 assertTrue(cause is T )
323- for ((index, clazz) in suppressed.withIndex()) {
324- assertTrue(clazz.isInstance(cause.suppressed[index]))
325- }
326307 }
327308
328309 private suspend fun CoroutineScope.awaitFutureWithCancel (cancellable : Boolean ): ListenableFuture <Int > {
0 commit comments