From 553a66e70bd3981dd8fed629d5ce8fb61b2cace9 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Mon, 4 Oct 2021 19:14:17 +0300 Subject: [PATCH 1/2] Update binary compatibility validator --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 410bc581ffd3fecb1da53a7a446e691a9eb9ecc1 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Tue, 5 Oct 2021 15:08:46 +0300 Subject: [PATCH 2/2] Fix race in testFuturePropagatesExceptionToParentAfterCancellation --- .../test/ListenableFutureTest.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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)