[K/N] Deprecate -Xworker-exception-handling ^KT-65170
Also deprecate legacy option with error (was a warning since 1.9.20-Beta)
This commit is contained in:
committed by
Space Team
parent
06095e86ca
commit
48f5e1d05c
@@ -1,28 +0,0 @@
|
||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||
|
||||
package runtime.workers.worker_exceptions_legacy
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.native.concurrent.*
|
||||
|
||||
@Test
|
||||
fun testExecuteAfterStartLegacy() {
|
||||
val worker = Worker.start()
|
||||
worker.executeAfter(0L, {
|
||||
throw Error("testExecuteAfterStartLegacy error")
|
||||
}.freeze())
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testExecuteStartLegacy() {
|
||||
val worker = Worker.start()
|
||||
val future = worker.execute(TransferMode.SAFE, {}) {
|
||||
throw Error("testExecuteStartLegacy error")
|
||||
}
|
||||
assertFailsWith<Throwable> {
|
||||
future.result
|
||||
}
|
||||
worker.requestTermination().result
|
||||
}
|
||||
Reference in New Issue
Block a user