Skip to content

Commit 1ba202d

Browse files
authored
Update binary compatibility validator (#2969)
* Update binary compatibility validator * Fix race in testFuturePropagatesExceptionToParentAfterCancellation
1 parent 60eefec commit 1ba202d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rxjava2_version=2.2.8
2222
rxjava3_version=3.0.2
2323
javafx_version=11.0.2
2424
javafx_plugin_version=0.0.8
25-
binary_compatibility_validator_version=0.7.0
25+
binary_compatibility_validator_version=0.8.0-RC
2626
blockhound_version=1.0.2.RELEASE
2727
jna_version=5.5.0
2828

integration/kotlinx-coroutines-guava/test/ListenableFutureTest.kt

+7-4
Original file line numberDiff line numberDiff line change
@@ -756,19 +756,22 @@ class ListenableFutureTest : TestBase() {
756756
}
757757

758758
@Test
759-
fun futurePropagatesExceptionToParentAfterCancellation() = runTest {
760-
val latch = CompletableDeferred<Boolean>()
759+
fun testFuturePropagatesExceptionToParentAfterCancellation() = runTest {
760+
val throwLatch = CompletableDeferred<Boolean>()
761+
val cancelLatch = CompletableDeferred<Boolean>()
761762
val parent = Job()
762763
val scope = CoroutineScope(parent)
763764
val exception = TestException("propagated to parent")
764765
val future = scope.future {
766+
cancelLatch.complete(true)
765767
withContext(NonCancellable) {
766-
latch.await()
768+
throwLatch.await()
767769
throw exception
768770
}
769771
}
772+
cancelLatch.await()
770773
future.cancel(true)
771-
latch.complete(true)
774+
throwLatch.complete(true)
772775
parent.join()
773776
assertTrue(parent.isCancelled)
774777
assertEquals(exception, parent.getCancellationException().cause)

0 commit comments

Comments
 (0)