aboutsummaryrefslogtreecommitdiffstats
path: root/ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt')
-rw-r--r--ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt16
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt b/ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt
index 69640501..bc40b0fd 100644
--- a/ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt
+++ b/ui/kotlinx-coroutines-javafx/test/JavaFxObservableAsFlowTest.kt
@@ -83,4 +83,20 @@ class JavaFxObservableAsFlowTest : TestBase() {
}
}
+ @Test
+ fun testIntermediateCrash() = runTest {
+ if (!initPlatform()) {
+ println("Skipping JavaFxTest in headless environment")
+ return@runTest // ignore test in headless environments
+ }
+
+ val property = SimpleIntegerProperty(0)
+
+ assertFailsWith<TestException> {
+ property.asFlow().onEach {
+ yield()
+ throw TestException()
+ }.collect()
+ }
+ }
}