diff --git a/gradle.properties b/gradle.properties index 26e5147c51..46eef4d76e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,7 @@ rxjava2_version=2.2.8 rxjava3_version=3.0.2 javafx_version=11.0.2 javafx_plugin_version=0.0.8 -binary_compatibility_validator_version=0.7.0 +binary_compatibility_validator_version=0.8.0-RC blockhound_version=1.0.2.RELEASE jna_version=5.5.0 diff --git a/integration/kotlinx-coroutines-guava/test/ListenableFutureTest.kt b/integration/kotlinx-coroutines-guava/test/ListenableFutureTest.kt index 581e09abdd..511b1b0322 100644 --- a/integration/kotlinx-coroutines-guava/test/ListenableFutureTest.kt +++ b/integration/kotlinx-coroutines-guava/test/ListenableFutureTest.kt @@ -756,19 +756,22 @@ class ListenableFutureTest : TestBase() { } @Test - fun futurePropagatesExceptionToParentAfterCancellation() = runTest { - val latch = CompletableDeferred() + fun testFuturePropagatesExceptionToParentAfterCancellation() = runTest { + val throwLatch = CompletableDeferred() + val cancelLatch = CompletableDeferred() val parent = Job() val scope = CoroutineScope(parent) val exception = TestException("propagated to parent") val future = scope.future { + cancelLatch.complete(true) withContext(NonCancellable) { - latch.await() + throwLatch.await() throw exception } } + cancelLatch.await() future.cancel(true) - latch.complete(true) + throwLatch.complete(true) parent.join() assertTrue(parent.isCancelled) assertEquals(exception, parent.getCancellationException().cause)